angular / angular-cli
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
editorconfig
ejs
txt
jq
webmanifest
gitattributes
npmrc
xlf
mjs
eslintignore
prettierignore
  • 25 extensions are included in analyses: ts, json, md, js, html, xml, bzl, yml, sh, gitignore, css, editorconfig, ejs, yaml, cjs, txt, scss, jq, webmanifest, gitattributes, npmrc, xlf, mjs, eslintignore, prettierignore
  • 12 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/angular([^.]*)\.js" (AngularJS) (15 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (1 file).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (46 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (5 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (11 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (4 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (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 ".*/bootstrap[-].*" (Library) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (2 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.

main48065 LOC (49%) 461 files
test17092 LOC (17%) 406 files
generated0 LOC (0%) 0 files
build and deployment7710 LOC (8%) 63 files
other23288 LOC (24%) 265 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
ejs
webmanifest
jq
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 461 files match defined criteria (48,065 lines of code, 100.0% vs. main code):
    • 445 *.ts files (46,875 lines of code)
    • 3 *.ejs files (408 lines of code)
    • 6 *.bzl files (385 lines of code)
    • 5 *.js files (312 lines of code)
    • 1 *.webmanifest files (59 lines of code)
    • 1 *.jq files (26 lines of code)
  • " *.ts" is biggest, containing 97.52% of code.
  • " *.jq" is smallest, containing 0.05% of code.


*.ts46875 LOC (97%) 445 files
*.ejs408 LOC (<1%) 3 files
*.bzl385 LOC (<1%) 6 files
*.js312 LOC (<1%) 5 files
*.webmanifest59 LOC (<1%) 1 files
*.jq26 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
xlf
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*/protractor[.]conf[.]js".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 406 files match defined criteria (17,092 lines of code, 35.6% vs. main code):
    • 374 *.ts files (16,570 lines of code)
    • 15 *.js files (307 lines of code)
    • 6 *.html files (87 lines of code)
    • 2 *.yaml files (70 lines of code)
    • 1 *.xlf files (18 lines of code)
    • 1 *.mjs files (18 lines of code)
    • 1 *.cjs files (14 lines of code)
    • 5 *.css files (5 lines of code)
    • 1 *.scss files (3 lines of code)
  • " *.ts" is biggest, containing 96.95% of code.
  • " *.scss" is smallest, containing 0.02% of code.


*.ts16570 LOC (96%) 374 files
*.js307 LOC (1%) 15 files
*.html87 LOC (<1%) 6 files
*.yaml70 LOC (<1%) 2 files
*.xlf18 LOC (<1%) 1 files
*.mjs18 LOC (<1%) 1 files
*.cjs14 LOC (<1%) 1 files
*.css5 LOC (<1%) 5 files
*.scss3 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 ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
  • 63 files match defined criteria (7,710 lines of code, 16.0% vs. main code):
    • 58 *.ts files (7,594 lines of code)
    • 2 *.html files (66 lines of code)
    • 3 *.sh files (50 lines of code)
  • " *.ts" is biggest, containing 98.5% of code.
  • " *.sh" is smallest, containing 0.65% of code.


*.ts7594 LOC (98%) 58 files
*.html66 LOC (<1%) 2 files
*.sh50 LOC (<1%) 3 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 265 files match defined criteria (23,288 lines of code, 48.5% vs. main code):
    • 52 *.md files (14,477 lines of code)
    • 213 *.json files (8,811 lines of code)
  • " *.md" is biggest, containing 62.17% of code.
  • " *.json" is smallest, containing 37.83% of code.


*.md14477 LOC (62%) 52 files
*.json8811 LOC (37%) 213 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
  • *.ejs 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
  • *.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
  • *.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
  • *.webmanifest files are analyzed with JsonAnalyzer:
    • 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
  • *.jq 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


2022-02-03 09:29