aws / aws-parallelcluster
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
ini
cfg
diff
gitattributes
in
jinja2
editorconfig
properties
  • 24 extensions are included in analyses: py, yaml, rb, md, txt, sh, json, yml, ini, erb, gitignore, cfg, diff, kts, gitattributes, in, jinja2, bat, xml, editorconfig, c, toml, gradle, properties
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (35 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (156 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • exclude files with path like ".*/docs/.*" (Documentation) (68 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) (83 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.

main43603 LOC (45%) 343 files
test42691 LOC (44%) 490 files
generated0 LOC (0%) 0 files
build and deployment1098 LOC (1%) 38 files
other8290 LOC (8%) 75 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 343 files match defined criteria (43,603 lines of code, 100.0% vs. main code):
    • 287 *.py files (33,927 lines of code)
    • 14 *.yaml files (8,834 lines of code)
    • 15 *.rb files (539 lines of code)
    • 17 *.erb files (209 lines of code)
    • 4 *.yml files (63 lines of code)
    • 3 *.kts files (24 lines of code)
    • 2 *.in files (5 lines of code)
    • 1 *.cfg files (2 lines of code)
  • " *.py" is biggest, containing 77.81% of code.
  • " *.cfg" is smallest, containing 0% of code.


*.py33927 LOC (77%) 287 files
*.yaml8834 LOC (20%) 14 files
*.rb539 LOC (1%) 15 files
*.erb209 LOC (<1%) 17 files
*.yml63 LOC (<1%) 4 files
*.kts24 LOC (<1%) 3 files
*.in5 LOC (<1%) 2 files
*.cfg2 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
jinja2
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[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*/tests_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 490 files match defined criteria (42,691 lines of code, 97.9% vs. main code):
    • 276 *.py files (32,952 lines of code)
    • 167 *.yaml files (9,262 lines of code)
    • 44 *.sh files (406 lines of code)
    • 2 *.jinja2 files (38 lines of code)
    • 1 *.c files (33 lines of code)
  • " *.py" is biggest, containing 77.19% of code.
  • " *.c" is smallest, containing 0.08% of code.


*.py32952 LOC (77%) 276 files
*.yaml9262 LOC (21%) 167 files
*.sh406 LOC (<1%) 44 files
*.jinja238 LOC (<1%) 2 files
*.c33 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]gradle".
  • 38 files match defined criteria (1,098 lines of code, 2.5% vs. main code):
    • 36 *.sh files (963 lines of code)
    • 1 *.bat files (68 lines of code)
    • 1 *.gradle files (67 lines of code)
  • " *.sh" is biggest, containing 87.7% of code.
  • " *.gradle" is smallest, containing 6.1% of code.


*.sh963 LOC (87%) 36 files
*.bat68 LOC (6%) 1 files
*.gradle67 LOC (6%) 1 files
Other Code
ini
diff
cfg
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 ".*/[.]gitignore".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]diff".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 75 files match defined criteria (8,290 lines of code, 19.0% vs. main code):
    • 37 *.json files (4,510 lines of code)
    • 9 *.md files (2,221 lines of code)
    • 21 *.ini files (1,393 lines of code)
    • 4 *.diff files (72 lines of code)
    • 2 *.yaml files (64 lines of code)
    • 1 *.xml files (18 lines of code)
    • 1 *.cfg files (12 lines of code)
  • " *.json" is biggest, containing 54.4% of code.
  • " *.cfg" is smallest, containing 0.14% of code.


*.json4510 LOC (54%) 37 files
*.md2221 LOC (26%) 9 files
*.ini1393 LOC (16%) 21 files
*.diff72 LOC (<1%) 4 files
*.yaml64 LOC (<1%) 2 files
*.xml18 LOC (<1%) 1 files
*.cfg12 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.erb 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
  • *.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
  • *.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)
  • *.in files are analyzed with RustAnalyzer:
    • 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
  • *.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


2022-01-30 22:21