aws-samples / amazon-chime-sdk
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
properties
plist
storyboard
babelrc
eslintignore
txt
  • 25 extensions are included in analyses: tsx, jsx, js, kt, json, swift, css, ts, xml, md, gitignore, yaml, gradle, html, properties, plist, storyboard, babelrc, bat, toml, eslintignore, sh, MD, graphql, txt
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (2 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (21 files).
    • exclude files with path like ".*/dependencies/.*" (Dependencies) (1 file).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*[.]txt" (Text files) (0 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main29748 LOC (10%) 444 files
test86 LOC (<1%) 1 files
generated119874 LOC (43%) 9 files
build and deployment736 LOC (<1%) 15 files
other123630 LOC (45%) 114 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 444 files match defined criteria (29,748 lines of code, 100.0% vs. main code):
    • 76 *.jsx files (7,738 lines of code)
    • 116 *.tsx files (5,251 lines of code)
    • 64 *.js files (4,793 lines of code)
    • 7 *.yaml files (4,158 lines of code)
    • 55 *.kt files (2,811 lines of code)
    • 45 *.swift files (1,875 lines of code)
    • 36 *.ts files (1,608 lines of code)
    • 36 *.css files (1,377 lines of code)
    • 5 *.html files (68 lines of code)
    • 1 *.md files (27 lines of code)
    • 1 *.graphql files (23 lines of code)
    • 2 *.toml files (19 lines of code)
  • " *.jsx" is biggest, containing 26.01% of code.
  • " *.toml" is smallest, containing 0.06% of code.


*.jsx7738 LOC (26%) 76 files
*.tsx5251 LOC (17%) 116 files
*.js4793 LOC (16%) 64 files
*.yaml4158 LOC (13%) 7 files
*.kt2811 LOC (9%) 55 files
*.swift1875 LOC (6%) 45 files
*.ts1608 LOC (5%) 36 files
*.css1377 LOC (4%) 36 files
*.html68 LOC (<1%) 5 files
*.md27 LOC (<1%) 1 files
*.graphql23 LOC (<1%) 1 files
*.toml19 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/src/androidTest/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 1 file matches defined criteria (86 lines of code, 0.3% vs. main code). All matches are in *.kt files.


*.kt86 LOC (100%) 1 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[-]lock[.]json".
  • 9 files match defined criteria (119,874 lines of code, 403.0% vs. main code). All matches are in *.json files.


*.json119874 LOC (100%) 9 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/package[-]lock[.]json".
  • 15 files match defined criteria (736 lines of code, 2.5% vs. main code):
    • 5 *.js files (312 lines of code)
    • 7 *.gradle files (244 lines of code)
    • 2 *.bat files (122 lines of code)
    • 1 *.sh files (58 lines of code)
  • " *.js" is biggest, containing 42.39% of code.
  • " *.sh" is smallest, containing 7.88% of code.


*.js312 LOC (42%) 5 files
*.gradle244 LOC (33%) 7 files
*.bat122 LOC (16%) 2 files
*.sh58 LOC (7%) 1 files
Other Code
storyboard
plist
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 114 files match defined criteria (123,630 lines of code, 415.6% vs. main code):
    • 48 *.json files (120,887 lines of code)
    • 19 *.md files (843 lines of code)
    • 31 *.xml files (756 lines of code)
    • 4 *.storyboard files (662 lines of code)
    • 4 *.plist files (173 lines of code)
    • 1 *.ts files (92 lines of code)
    • 1 *.css files (76 lines of code)
    • 3 *.properties files (52 lines of code)
    • 2 *.js files (47 lines of code)
    • 1 *.html files (42 lines of code)
  • " *.json" is biggest, containing 97.78% of code.
  • " *.html" is smallest, containing 0.03% of code.


*.json120887 LOC (97%) 48 files
*.md843 LOC (<1%) 19 files
*.xml756 LOC (<1%) 31 files
*.storyboard662 LOC (<1%) 4 files
*.plist173 LOC (<1%) 4 files
*.ts92 LOC (<1%) 1 files
*.css76 LOC (<1%) 1 files
*.properties52 LOC (<1%) 3 files
*.js47 LOC (<1%) 2 files
*.html42 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.jsx files are analyzed with HtmlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.tsx files are analyzed with TypeScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.js files are analyzed with JavaScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.yaml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.kt files are analyzed with KotlinAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis (based on imports and package statements)
  • *.swift files are analyzed with SwiftAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.css files are analyzed with CssAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.html files are analyzed with HtmlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.md files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.graphql files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.toml files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2022-01-31 17:05