awslabs / scale-out-computing-on-aws
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
txt
ps
cfg
gitattributes
  • 14 extensions are included in analyses: py, md, html, sh, json, js, css, txt, yml, svg, ps, cfg, gitignore, gitattributes
  • 10 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (5 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (86 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 ".*[.]min[.]js" (Minimized JS library) (4 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (1 file).
    • exclude files with path like ".*jquery[.].*[.]js" (jQuery library) (0 files).
    • exclude files with path like ".*[.]txt" (Text files) (7 files).
    • exclude files with path like ".*/static/js/.*" (JS library) (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.

main33017 LOC (73%) 149 files
test0 LOC (0%) 0 files
generated154 LOC (<1%) 1 files
build and deployment1729 LOC (3%) 13 files
other10166 LOC (22%) 19 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 149 files match defined criteria (33,017 lines of code, 100.0% vs. main code):
    • 6 *.css files (14,449 lines of code)
    • 108 *.py files (12,774 lines of code)
    • 30 *.html files (5,306 lines of code)
    • 1 *.cfg files (262 lines of code)
    • 4 *.yml files (226 lines of code)
  • " *.css" is biggest, containing 43.76% of code.
  • " *.yml" is smallest, containing 0.68% of code.


*.css14449 LOC (43%) 6 files
*.py12774 LOC (38%) 108 files
*.html5306 LOC (16%) 30 files
*.cfg262 LOC (<1%) 1 files
*.yml226 LOC (<1%) 4 files
Generated Code
Automatically generated files, not manually changed after generation.
ps
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.](ps|eps|pfa)".
  • 1 file matches defined criteria (154 lines of code, 0.5% vs. main code). All matches are in *.ps files.


*.ps154 LOC (100%) 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitignore".
  • 13 files match defined criteria (1,729 lines of code, 5.2% vs. main code). All matches are in *.sh files.


*.sh1729 LOC (100%) 13 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 19 files match defined criteria (10,166 lines of code, 30.8% vs. main code):
    • 3 *.svg files (8,966 lines of code)
    • 12 *.json files (972 lines of code)
    • 4 *.md files (228 lines of code)
  • " *.svg" is biggest, containing 88.2% of code.
  • " *.md" is smallest, containing 2.24% of code.


*.svg8966 LOC (88%) 3 files
*.json972 LOC (9%) 12 files
*.md228 LOC (2%) 4 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
  • *.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
  • *.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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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 19:15