aws / aws-toolkit-common
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
csproj
txt
proj
properties
npmignore
nuspec
  • 17 extensions are included in analyses: cs, json, md, ts, kt, csproj, yml, gitignore, txt, proj, kts, properties, npmignore, js, bat, nuspec, yaml
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (10 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (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) (2 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.

main1553 LOC (8%) 34 files
test567 LOC (3%) 11 files
generated9755 LOC (53%) 3 files
build and deployment191 LOC (1%) 5 files
other6029 LOC (33%) 32 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 34 files match defined criteria (1,553 lines of code, 100.0% vs. main code):
    • 17 *.cs files (666 lines of code)
    • 4 *.kt files (383 lines of code)
    • 5 *.ts files (235 lines of code)
    • 2 *.kts files (138 lines of code)
    • 2 *.proj files (76 lines of code)
    • 3 *.yml files (50 lines of code)
    • 1 *.js files (5 lines of code)
  • " *.cs" is biggest, containing 42.88% of code.
  • " *.js" is smallest, containing 0.32% of code.


*.cs666 LOC (42%) 17 files
*.kt383 LOC (24%) 4 files
*.ts235 LOC (15%) 5 files
*.kts138 LOC (8%) 2 files
*.proj76 LOC (4%) 2 files
*.yml50 LOC (3%) 3 files
*.js5 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*/test[-]data/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 11 files match defined criteria (567 lines of code, 36.5% vs. main code):
    • 5 *.cs files (318 lines of code)
    • 2 *.kt files (115 lines of code)
    • 2 *.ts files (72 lines of code)
    • 2 *.csproj files (62 lines of code)
  • " *.cs" is biggest, containing 56.08% of code.
  • " *.csproj" is smallest, containing 10.93% of code.


*.cs318 LOC (56%) 5 files
*.kt115 LOC (20%) 2 files
*.ts72 LOC (12%) 2 files
*.csproj62 LOC (10%) 2 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 ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 3 files match defined criteria (9,755 lines of code, 628.1% vs. main code):
    • 2 *.cs files (6,432 lines of code)
    • 1 *.json files (3,323 lines of code)
  • " *.cs" is biggest, containing 65.94% of code.
  • " *.json" is smallest, containing 34.06% of code.


*.cs6432 LOC (65%) 2 files
*.json3323 LOC (34%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
nuspec
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 ".*[.]bat".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]nuspec".
  • 5 files match defined criteria (191 lines of code, 12.3% vs. main code):
    • 3 *.csproj files (94 lines of code)
    • 1 *.bat files (76 lines of code)
    • 1 *.nuspec files (21 lines of code)
  • " *.csproj" is biggest, containing 49.21% of code.
  • " *.nuspec" is smallest, containing 10.99% of code.


*.csproj94 LOC (49%) 3 files
*.bat76 LOC (39%) 1 files
*.nuspec21 LOC (10%) 1 files
Other Code
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 ".*/[.]npmignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]txt".
  • 32 files match defined criteria (6,029 lines of code, 388.2% vs. main code):
    • 21 *.json files (5,516 lines of code)
    • 10 *.md files (507 lines of code)
    • 1 *.properties files (6 lines of code)
  • " *.json" is biggest, containing 91.49% of code.
  • " *.properties" is smallest, containing 0.1% of code.


*.json5516 LOC (91%) 21 files
*.md507 LOC (8%) 10 files
*.properties6 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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)
  • *.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)
  • *.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
  • *.kts 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)
  • *.proj 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
  • *.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 15:14