aws / aws-cdk
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
npmignore
txt
fs
dockerignore
snap
mod
csproj
fsproj
gitattributes
patch
npmrc
mjs
  • 31 extensions are included in analyses: ts, json, js, md, gitignore, npmignore, py, sh, txt, yaml, yml, java, cs, go, fs, svg, dockerignore, snap, mod, bat, xml, graphql, csproj, bash, fsproj, html, toml, gitattributes, patch, npmrc, mjs
  • 12 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (861 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (30 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (2 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (3 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 ".*/[Pp]ackages\/.+\.\d+\/.*" (NuGet) (17 files).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (4 files).
    • exclude files with path like ".*[.]txt" (Text files) (41 files).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (3 files).
    • exclude files with path like ".*/assets/lib/.*" (Library) (6 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.

main133847 LOC (16%) 1982 files
test233296 LOC (29%) 1717 files
generated0 LOC (0%) 0 files
build and deployment1167 LOC (<1%) 52 files
other436039 LOC (54%) 1542 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
fs
fsproj
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1982 files match defined criteria (133,847 lines of code, 100.0% vs. main code):
    • 1,614 *.ts files (129,333 lines of code)
    • 283 *.js files (1,955 lines of code)
    • 40 *.py files (1,833 lines of code)
    • 4 *.go files (130 lines of code)
    • 12 *.cs files (126 lines of code)
    • 8 *.java files (114 lines of code)
    • 3 *.yaml files (106 lines of code)
    • 1 *.toml files (94 lines of code)
    • 8 *.fs files (62 lines of code)
    • 4 *.fsproj files (61 lines of code)
    • 4 *.mod files (28 lines of code)
    • 1 *.yml files (5 lines of code)
  • " *.ts" is biggest, containing 96.63% of code.
  • " *.yml" is smallest, containing 0% of code.


*.ts129333 LOC (96%) 1614 files
*.js1955 LOC (1%) 283 files
*.py1833 LOC (1%) 40 files
*.go130 LOC (<1%) 4 files
*.cs126 LOC (<1%) 12 files
*.java114 LOC (<1%) 8 files
*.yaml106 LOC (<1%) 3 files
*.toml94 LOC (<1%) 1 files
*.fs62 LOC (<1%) 8 files
*.fsproj61 LOC (<1%) 4 files
*.mod28 LOC (<1%) 4 files
*.yml5 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*[.]snap".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*/mock[-].*".
    • files with any line of content like ".*/simpletest/.*".
  • 1717 files match defined criteria (233,296 lines of code, 174.3% vs. main code):
    • 1,546 *.ts files (226,670 lines of code)
    • 29 *.js files (2,051 lines of code)
    • 53 *.py files (1,677 lines of code)
    • 6 *.snap files (1,656 lines of code)
    • 31 *.yaml files (496 lines of code)
    • 29 *.sh files (377 lines of code)
    • 4 *.bash files (165 lines of code)
    • 5 *.graphql files (109 lines of code)
    • 4 *.java files (40 lines of code)
    • 5 *.go files (37 lines of code)
    • 1 *.toml files (12 lines of code)
    • 3 *.html files (5 lines of code)
    • 1 *.mjs files (1 lines of code)
  • " *.ts" is biggest, containing 97.16% of code.
  • " *.mjs" is smallest, containing 0% of code.


*.ts226670 LOC (97%) 1546 files
*.js2051 LOC (<1%) 29 files
*.py1677 LOC (<1%) 53 files
*.snap1656 LOC (<1%) 6 files
*.yaml496 LOC (<1%) 31 files
*.sh377 LOC (<1%) 29 files
*.bash165 LOC (<1%) 4 files
*.graphql109 LOC (<1%) 5 files
*.java40 LOC (<1%) 4 files
*.go37 LOC (<1%) 5 files
*.toml12 LOC (<1%) 1 files
*.html5 LOC (<1%) 3 files
*.mjs1 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]csproj".
  • 52 files match defined criteria (1,167 lines of code, 0.9% vs. main code):
    • 43 *.sh files (1,075 lines of code)
    • 5 *.bat files (46 lines of code)
    • 4 *.csproj files (46 lines of code)
  • " *.sh" is biggest, containing 92.12% of code.
  • " *.csproj" is smallest, containing 3.94% of code.


*.sh1075 LOC (92%) 43 files
*.bat46 LOC (3%) 5 files
*.csproj46 LOC (3%) 4 files
Other Code
patch
mod
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 ".*[.]patch".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 1542 files match defined criteria (436,039 lines of code, 325.8% vs. main code):
    • 1,189 *.json files (382,558 lines of code)
    • 347 *.md files (53,231 lines of code)
    • 4 *.xml files (227 lines of code)
    • 1 *.patch files (21 lines of code)
    • 1 *.mod files (2 lines of code)
  • " *.json" is biggest, containing 87.73% of code.
  • " *.mod" is smallest, containing 0% of code.


*.json382558 LOC (87%) 1189 files
*.md53231 LOC (12%) 347 files
*.xml227 LOC (<1%) 4 files
*.patch21 LOC (<1%) 1 files
*.mod2 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.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
  • *.cs files are analyzed with CSharpAnalyzer:
    • 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 (based on namespace heuristics)
  • *.java files are analyzed with JavaAnalyzer:
    • 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 (based on package names)
  • *.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
  • *.fs 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
  • *.fsproj files are analyzed with XmlAnalyzer:
    • 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
  • *.mod files are analyzed with XmlAnalyzer:
    • 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


2022-01-31 14:48