awslabs / aws-saas-boost
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
cshtml
txt
properties
asax
dockerignore
npmrc
csproj
  • 25 extensions are included in analyses: js, java, xml, sh, md, yaml, cs, jsp, cshtml, json, css, yml, sql, scss, txt, py, ps1, gitignore, properties, asax, dockerignore, html, npmrc, svg, csproj
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (17 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (5 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 ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (2 files).
    • exclude files with path like ".*[.]txt" (Text files) (3 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (6 files).
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.

main39096 LOC (53%) 260 files
test2171 LOC (2%) 26 files
generated0 LOC (0%) 0 files
build and deployment968 LOC (1%) 25 files
other30450 LOC (41%) 179 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 260 files match defined criteria (39,096 lines of code, 100.0% vs. main code):
    • 83 *.java files (14,793 lines of code)
    • 20 *.yaml files (12,442 lines of code)
    • 141 *.js files (11,081 lines of code)
    • 3 *.py files (335 lines of code)
    • 5 *.yml files (229 lines of code)
    • 1 *.ps1 files (128 lines of code)
    • 2 *.css files (49 lines of code)
    • 1 *.html files (23 lines of code)
    • 4 *.scss files (16 lines of code)
  • " *.java" is biggest, containing 37.84% of code.
  • " *.scss" is smallest, containing 0.04% of code.


*.java14793 LOC (37%) 83 files
*.yaml12442 LOC (31%) 20 files
*.js11081 LOC (28%) 141 files
*.py335 LOC (<1%) 3 files
*.yml229 LOC (<1%) 5 files
*.ps1128 LOC (<1%) 1 files
*.css49 LOC (<1%) 2 files
*.html23 LOC (<1%) 1 files
*.scss16 LOC (<1%) 4 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]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 26 files match defined criteria (2,171 lines of code, 5.6% vs. main code):
    • 24 *.java files (2,138 lines of code)
    • 1 *.yaml files (27 lines of code)
    • 1 *.js files (6 lines of code)
  • " *.java" is biggest, containing 98.48% of code.
  • " *.js" is smallest, containing 0.28% of code.


*.java2138 LOC (98%) 24 files
*.yaml27 LOC (1%) 1 files
*.js6 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 ".*/pom[.]xml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
  • 25 files match defined criteria (968 lines of code, 2.5% vs. main code). All matches are in *.sh files.


*.sh968 LOC (100%) 25 files
Other Code
cshtml
csproj
properties
asax
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/checkstyle[.]xml".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 179 files match defined criteria (30,450 lines of code, 77.9% vs. main code):
    • 6 *.json files (15,545 lines of code)
    • 81 *.xml files (4,935 lines of code)
    • 1 *.js files (4,509 lines of code)
    • 35 *.java files (2,680 lines of code)
    • 12 *.cs files (876 lines of code)
    • 10 *.cshtml files (682 lines of code)
    • 11 *.jsp files (468 lines of code)
    • 13 *.md files (341 lines of code)
    • 1 *.csproj files (216 lines of code)
    • 2 *.sql files (67 lines of code)
    • 2 *.ps1 files (66 lines of code)
    • 3 *.properties files (34 lines of code)
    • 1 *.sh files (30 lines of code)
    • 1 *.asax files (1 lines of code)
  • " *.json" is biggest, containing 51.05% of code.
  • " *.asax" is smallest, containing 0% of code.


*.json15545 LOC (51%) 6 files
*.xml4935 LOC (16%) 81 files
*.js4509 LOC (14%) 1 files
*.java2680 LOC (8%) 35 files
*.cs876 LOC (2%) 12 files
*.cshtml682 LOC (2%) 10 files
*.jsp468 LOC (1%) 11 files
*.md341 LOC (1%) 13 files
*.csproj216 LOC (<1%) 1 files
*.sql67 LOC (<1%) 2 files
*.ps166 LOC (<1%) 2 files
*.properties34 LOC (<1%) 3 files
*.sh30 LOC (<1%) 1 files
*.asax1 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.ps1 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
  • *.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
  • *.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
  • *.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


2022-01-31 22:37