aws-samples / net-modernization
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
asax
gitattributes
  • 18 extensions are included in analyses: svg, scss, cs, js, less, css, yml, md, json, csproj, txt, gitignore, html, asax, py, gitattributes, sql, yaml
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/angular([^.]*)\.js" (AngularJS) (6 files).
    • exclude files with path like ".*[.]min[.]js" (Minimized JS library) (2 files).
    • exclude files with path like ".*font-?awesome\.(css|less|scss|styl)" (Font Awesome) (6 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (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 ".*[.]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.

main55138 LOC (70%) 171 files
test1378 LOC (1%) 16 files
generated103 LOC (<1%) 8 files
build and deployment262 LOC (<1%) 3 files
other20903 LOC (26%) 2593 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
asax
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 171 files match defined criteria (55,138 lines of code, 100.0% vs. main code):
    • 20 *.css files (29,582 lines of code)
    • 54 *.scss files (9,774 lines of code)
    • 34 *.less files (9,154 lines of code)
    • 14 *.yml files (2,422 lines of code)
    • 10 *.js files (2,028 lines of code)
    • 34 *.cs files (1,189 lines of code)
    • 2 *.html files (934 lines of code)
    • 1 *.yaml files (40 lines of code)
    • 1 *.py files (14 lines of code)
    • 1 *.asax files (1 lines of code)
  • " *.css" is biggest, containing 53.65% of code.
  • " *.asax" is smallest, containing 0% of code.


*.css29582 LOC (53%) 20 files
*.scss9774 LOC (17%) 54 files
*.less9154 LOC (16%) 34 files
*.yml2422 LOC (4%) 14 files
*.js2028 LOC (3%) 10 files
*.cs1189 LOC (2%) 34 files
*.html934 LOC (1%) 2 files
*.yaml40 LOC (<1%) 1 files
*.py14 LOC (<1%) 1 files
*.asax1 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 any line of content like ".*/simpletest/.*".
  • 16 files match defined criteria (1,378 lines of code, 2.5% vs. main code):
    • 13 *.cs files (1,191 lines of code)
    • 3 *.csproj files (187 lines of code)
  • " *.cs" is biggest, containing 86.43% of code.
  • " *.csproj" is smallest, containing 13.57% of code.


*.cs1191 LOC (86%) 13 files
*.csproj187 LOC (13%) 3 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 ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 8 files match defined criteria (103 lines of code, 0.2% vs. main code). All matches are in *.cs files.


*.cs103 LOC (100%) 8 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 ".*[.]csproj".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
  • 3 files match defined criteria (262 lines of code, 0.5% vs. main code). All matches are in *.csproj files.


*.csproj262 LOC (100%) 3 files
Other Code
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 ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 2593 files match defined criteria (20,903 lines of code, 37.9% vs. main code):
    • 2,568 *.svg files (20,368 lines of code)
    • 11 *.json files (355 lines of code)
    • 13 *.md files (144 lines of code)
    • 1 *.sql files (36 lines of code)
  • " *.svg" is biggest, containing 97.44% of code.
  • " *.sql" is smallest, containing 0.17% of code.


*.svg20368 LOC (97%) 2568 files
*.json355 LOC (1%) 11 files
*.md144 LOC (<1%) 13 files
*.sql36 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.less files are analyzed with LessAnalyzer:
    • 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
  • *.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)
  • *.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
  • *.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
  • *.asax 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


2022-01-31 16:29