angular / dgeni-packages
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
spec
txt
  • 10 extensions are included in analyses: js, ts, html, md, json, gitignore, yml, css, spec, txt
  • 8 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (6 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (1 file).
    • exclude files with path like ".*/docs/.*" (Documentation) (8 files).
    • exclude files with path like ".*/docs?/_?(build|themes?|templates?|static)/.*" (Sphinx) (0 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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (0 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.

main5262 LOC (37%) 274 files
test6128 LOC (43%) 146 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other2740 LOC (19%) 32 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 ".*".
  • 274 files match defined criteria (5,262 lines of code, 100.0% vs. main code):
    • 176 *.js files (3,158 lines of code)
    • 76 *.ts files (1,606 lines of code)
    • 22 *.html files (498 lines of code)
  • " *.js" is biggest, containing 60.02% of code.
  • " *.html" is smallest, containing 9.46% of code.


*.js3158 LOC (60%) 176 files
*.ts1606 LOC (30%) 76 files
*.html498 LOC (9%) 22 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 paths like ".*[.]spec[.]ts".
    • files with paths like ".*[.]spec[.]js".
    • files with any line of content like ".*/simpletest/.*".
  • 146 files match defined criteria (6,128 lines of code, 116.5% vs. main code):
    • 114 *.js files (4,569 lines of code)
    • 32 *.ts files (1,559 lines of code)
  • " *.js" is biggest, containing 74.56% of code.
  • " *.ts" is smallest, containing 25.44% of code.


*.js4569 LOC (74%) 114 files
*.ts1559 LOC (25%) 32 files
Other Code
spec
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 ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
  • 32 files match defined criteria (2,740 lines of code, 52.1% vs. main code):
    • 7 *.md files (1,864 lines of code)
    • 14 *.js files (659 lines of code)
    • 6 *.json files (177 lines of code)
    • 3 *.html files (38 lines of code)
    • 1 *.css files (1 lines of code)
    • 1 *.spec files (1 lines of code)
  • " *.md" is biggest, containing 68.03% of code.
  • " *.spec" is smallest, containing 0.04% of code.


*.md1864 LOC (68%) 7 files
*.js659 LOC (24%) 14 files
*.json177 LOC (6%) 6 files
*.html38 LOC (1%) 3 files
*.css1 LOC (<1%) 1 files
*.spec1 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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


2022-02-02 22:07