angular / dev-infra
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
mjs
editorconfig
patch
prettierignore
  • 15 extensions are included in analyses: ts, bzl, json, js, yml, md, mjs, sh, html, css, gitignore, editorconfig, cjs, patch, prettierignore
  • 4 criteria are used to exclude files from analysis:
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (4 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (22 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (1 file).
    • 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.

main11957 LOC (60%) 232 files
test6682 LOC (34%) 81 files
generated0 LOC (0%) 0 files
build and deployment12 LOC (<1%) 1 files
other979 LOC (4%) 30 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 232 files match defined criteria (11,957 lines of code, 100.0% vs. main code):
    • 192 *.ts files (9,828 lines of code)
    • 24 *.bzl files (1,657 lines of code)
    • 5 *.mjs files (246 lines of code)
    • 5 *.yml files (122 lines of code)
    • 4 *.js files (90 lines of code)
    • 1 *.html files (13 lines of code)
    • 1 *.css files (1 lines of code)
  • " *.ts" is biggest, containing 82.19% of code.
  • " *.css" is smallest, containing 0.01% of code.


*.ts9828 LOC (82%) 192 files
*.bzl1657 LOC (13%) 24 files
*.mjs246 LOC (2%) 5 files
*.yml122 LOC (1%) 5 files
*.js90 LOC (<1%) 4 files
*.html13 LOC (<1%) 1 files
*.css1 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 81 files match defined criteria (6,682 lines of code, 55.9% vs. main code):
    • 67 *.ts files (5,706 lines of code)
    • 4 *.js files (886 lines of code)
    • 3 *.html files (36 lines of code)
    • 1 *.bzl files (25 lines of code)
    • 2 *.mjs files (17 lines of code)
    • 2 *.sh files (10 lines of code)
    • 2 *.css files (2 lines of code)
  • " *.ts" is biggest, containing 85.39% of code.
  • " *.css" is smallest, containing 0.03% of code.


*.ts5706 LOC (85%) 67 files
*.js886 LOC (13%) 4 files
*.html36 LOC (<1%) 3 files
*.bzl25 LOC (<1%) 1 files
*.mjs17 LOC (<1%) 2 files
*.sh10 LOC (<1%) 2 files
*.css2 LOC (<1%) 2 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 ".*[.]sh".
    • files with paths like ".*/package[.]json".
  • 1 file matches defined criteria (12 lines of code, 0.1% vs. main code). All matches are in *.sh files.


*.sh12 LOC (100%) 1 files
Other Code
patch
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 ".*[.]editorconfig".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]patch".
  • 30 files match defined criteria (979 lines of code, 8.2% vs. main code):
    • 19 *.json files (507 lines of code)
    • 10 *.md files (453 lines of code)
    • 1 *.patch files (19 lines of code)
  • " *.json" is biggest, containing 51.79% of code.
  • " *.patch" is smallest, containing 1.94% of code.


*.json507 LOC (51%) 19 files
*.md453 LOC (46%) 10 files
*.patch19 LOC (1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.bzl 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
  • *.mjs 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
  • *.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
  • *.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


2022-02-02 22:19