awslabs / aws-orbit-workbench
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
txt
in
cfg
tpl
dockerignore
ini
eslintignore
prettierignore
  • 23 extensions are included in analyses: py, yaml, sh, ipynb, txt, in, json, tsx, cfg, toml, svg, md, tpl, ts, gitignore, css, yml, js, dockerignore, html, ini, eslintignore, prettierignore
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (18 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (2 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (2 files).
    • 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) (41 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.

main60183 LOC (66%) 376 files
test1091 LOC (1%) 18 files
generated0 LOC (0%) 0 files
build and deployment898 LOC (<1%) 72 files
other27841 LOC (30%) 135 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
in
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 376 files match defined criteria (60,183 lines of code, 100.0% vs. main code):
    • 109 *.yaml files (37,328 lines of code)
    • 164 *.py files (18,050 lines of code)
    • 18 *.tsx files (2,485 lines of code)
    • 9 *.tpl files (542 lines of code)
    • 29 *.in files (433 lines of code)
    • 16 *.toml files (427 lines of code)
    • 16 *.cfg files (347 lines of code)
    • 7 *.ts files (282 lines of code)
    • 2 *.html files (177 lines of code)
    • 4 *.css files (107 lines of code)
    • 1 *.yml files (4 lines of code)
    • 1 *.js files (1 lines of code)
  • " *.yaml" is biggest, containing 62.02% of code.
  • " *.js" is smallest, containing 0% of code.


*.yaml37328 LOC (62%) 109 files
*.py18050 LOC (29%) 164 files
*.tsx2485 LOC (4%) 18 files
*.tpl542 LOC (<1%) 9 files
*.in433 LOC (<1%) 29 files
*.toml427 LOC (<1%) 16 files
*.cfg347 LOC (<1%) 16 files
*.ts282 LOC (<1%) 7 files
*.html177 LOC (<1%) 2 files
*.css107 LOC (<1%) 4 files
*.yml4 LOC (<1%) 1 files
*.js1 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 18 files match defined criteria (1,091 lines of code, 1.8% vs. main code):
    • 8 *.py files (917 lines of code)
    • 7 *.sh files (102 lines of code)
    • 1 *.toml files (29 lines of code)
    • 1 *.cfg files (24 lines of code)
    • 1 *.yaml files (19 lines of code)
  • " *.py" is biggest, containing 84.05% of code.
  • " *.yaml" is smallest, containing 1.74% of code.


*.py917 LOC (84%) 8 files
*.sh102 LOC (9%) 7 files
*.toml29 LOC (2%) 1 files
*.cfg24 LOC (2%) 1 files
*.yaml19 LOC (1%) 1 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
  • 72 files match defined criteria (898 lines of code, 1.5% vs. main code). All matches are in *.sh files.


*.sh898 LOC (100%) 72 files
Other Code
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 135 files match defined criteria (27,841 lines of code, 46.3% vs. main code):
    • 42 *.ipynb files (21,118 lines of code)
    • 41 *.yaml files (3,263 lines of code)
    • 24 *.json files (2,608 lines of code)
    • 8 *.md files (493 lines of code)
    • 8 *.svg files (160 lines of code)
    • 3 *.py files (92 lines of code)
    • 8 *.sh files (84 lines of code)
    • 1 *.ini files (23 lines of code)
  • " *.ipynb" is biggest, containing 75.85% of code.
  • " *.ini" is smallest, containing 0.08% of code.


*.ipynb21118 LOC (75%) 42 files
*.yaml3263 LOC (11%) 41 files
*.json2608 LOC (9%) 24 files
*.md493 LOC (1%) 8 files
*.svg160 LOC (<1%) 8 files
*.py92 LOC (<1%) 3 files
*.sh84 LOC (<1%) 8 files
*.ini23 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.py files are analyzed with PythonAnalyzer:
    • 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
  • *.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
  • *.tpl 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
  • *.in files are analyzed with RustAnalyzer:
    • 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
  • *.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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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
  • *.yml 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
  • *.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


2022-01-31 19:32