aws / graph-notebook
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
in
cfg
eslintignore
prettierignore
  • 18 extensions are included in analyses: py, ipynb, md, txt, json, js, html, ts, yaml, css, yml, ini, in, cfg, gitignore, sh, eslintignore, prettierignore
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (9 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) (10 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.

main8456 LOC (19%) 119 files
test9258 LOC (21%) 96 files
generated0 LOC (0%) 0 files
build and deployment190 LOC (<1%) 3 files
other24666 LOC (57%) 43 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 ".*".
  • 119 files match defined criteria (8,456 lines of code, 100.0% vs. main code):
    • 86 *.py files (6,476 lines of code)
    • 7 *.ts files (959 lines of code)
    • 8 *.js files (368 lines of code)
    • 9 *.html files (326 lines of code)
    • 2 *.css files (260 lines of code)
    • 5 *.yaml files (45 lines of code)
    • 1 *.in files (13 lines of code)
    • 1 *.cfg files (9 lines of code)
  • " *.py" is biggest, containing 76.58% of code.
  • " *.cfg" is smallest, containing 0.11% of code.


*.py6476 LOC (76%) 86 files
*.ts959 LOC (11%) 7 files
*.js368 LOC (4%) 8 files
*.html326 LOC (3%) 9 files
*.css260 LOC (3%) 2 files
*.yaml45 LOC (<1%) 5 files
*.in13 LOC (<1%) 1 files
*.cfg9 LOC (<1%) 1 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 ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with any line of content like ".*/simpletest/.*".
  • 96 files match defined criteria (9,258 lines of code, 109.5% vs. main code):
    • 94 *.py files (9,194 lines of code)
    • 1 *.js files (41 lines of code)
    • 1 *.ts files (23 lines of code)
  • " *.py" is biggest, containing 99.31% of code.
  • " *.ts" is smallest, containing 0.25% of code.


*.py9194 LOC (99%) 94 files
*.js41 LOC (<1%) 1 files
*.ts23 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 ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 3 files match defined criteria (190 lines of code, 2.2% vs. main code):
    • 2 *.js files (126 lines of code)
    • 1 *.sh files (64 lines of code)
  • " *.js" is biggest, containing 66.32% of code.
  • " *.sh" is smallest, containing 33.68% of code.


*.js126 LOC (66%) 2 files
*.sh64 LOC (33%) 1 files
Other Code
ini
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 ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 43 files match defined criteria (24,666 lines of code, 291.7% vs. main code):
    • 14 *.json files (18,342 lines of code)
    • 11 *.ipynb files (5,744 lines of code)
    • 17 *.md files (571 lines of code)
    • 1 *.ini files (9 lines of code)
  • " *.json" is biggest, containing 74.36% of code.
  • " *.ini" is smallest, containing 0.04% of code.


*.json18342 LOC (74%) 14 files
*.ipynb5744 LOC (23%) 11 files
*.md571 LOC (2%) 17 files
*.ini9 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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-31 15:20