aws / amazon-genomics-cli
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
wdl
txt
mod
npmignore
webmanifest
dockerignore
patch
nf
gitmodules
  • 24 extensions are included in analyses: go, json, md, ts, py, wdl, sh, yml, yaml, gitignore, js, txt, mod, html, npmignore, scss, webmanifest, dockerignore, patch, MD, svg, toml, nf, gitmodules
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (22 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (29 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 ".*/bin/.*" (Binaries for distribution) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (3 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.

main16589 LOC (20%) 293 files
test9909 LOC (11%) 96 files
generated23639 LOC (28%) 5 files
build and deployment904 LOC (1%) 20 files
other31792 LOC (38%) 128 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
wdl
webmanifest
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 293 files match defined criteria (16,589 lines of code, 100.0% vs. main code):
    • 199 *.go files (10,424 lines of code)
    • 41 *.ts files (2,739 lines of code)
    • 33 *.py files (1,588 lines of code)
    • 4 *.yaml files (1,423 lines of code)
    • 1 *.toml files (169 lines of code)
    • 6 *.yml files (135 lines of code)
    • 3 *.html files (52 lines of code)
    • 1 *.wdl files (27 lines of code)
    • 1 *.md files (15 lines of code)
    • 2 *.js files (15 lines of code)
    • 1 *.scss files (1 lines of code)
    • 1 *.webmanifest files (1 lines of code)
  • " *.go" is biggest, containing 62.84% of code.
  • " *.webmanifest" is smallest, containing 0.01% of code.


*.go10424 LOC (62%) 199 files
*.ts2739 LOC (16%) 41 files
*.py1588 LOC (9%) 33 files
*.yaml1423 LOC (8%) 4 files
*.toml169 LOC (1%) 1 files
*.yml135 LOC (<1%) 6 files
*.html52 LOC (<1%) 3 files
*.wdl27 LOC (<1%) 1 files
*.md15 LOC (<1%) 1 files
*.js15 LOC (<1%) 2 files
*.scss1 LOC (<1%) 1 files
*.webmanifest1 LOC (<1%) 1 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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 96 files match defined criteria (9,909 lines of code, 59.7% vs. main code):
    • 90 *.go files (9,394 lines of code)
    • 5 *.py files (473 lines of code)
    • 1 *.ts files (42 lines of code)
  • " *.go" is biggest, containing 94.8% of code.
  • " *.ts" is smallest, containing 0.42% of code.


*.go9394 LOC (94%) 90 files
*.py473 LOC (4%) 5 files
*.ts42 LOC (<1%) 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".
    • files with paths like ".*/npm[-]shrinkwrap[.]json".
  • 5 files match defined criteria (23,639 lines of code, 142.5% vs. main code). All matches are in *.json files.


*.json23639 LOC (100%) 5 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 ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*[.]sh".
  • 20 files match defined criteria (904 lines of code, 5.4% vs. main code). All matches are in *.sh files.


*.sh904 LOC (100%) 20 files
Other Code
wdl
patch
mod
nf
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 ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/[.]npmignore".
  • 128 files match defined criteria (31,792 lines of code, 191.6% vs. main code):
    • 76 *.json files (24,374 lines of code)
    • 22 *.wdl files (5,067 lines of code)
    • 1 *.patch files (1,463 lines of code)
    • 20 *.md files (559 lines of code)
    • 5 *.yaml files (270 lines of code)
    • 3 *.mod files (48 lines of code)
    • 1 *.nf files (11 lines of code)
  • " *.json" is biggest, containing 76.67% of code.
  • " *.nf" is smallest, containing 0.03% of code.


*.json24374 LOC (76%) 76 files
*.wdl5067 LOC (15%) 22 files
*.patch1463 LOC (4%) 1 files
*.md559 LOC (1%) 20 files
*.yaml270 LOC (<1%) 5 files
*.mod48 LOC (<1%) 3 files
*.nf11 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.go files are analyzed with GoLangAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.wdl 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
  • *.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
  • *.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
  • *.scss files are analyzed with ScssAnalyzer:
    • 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
  • *.webmanifest files are analyzed with JsonAnalyzer:
    • 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


2022-01-31 15:21