angular / components
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
npmrc
txt
prettierignore
  • 20 extensions are included in analyses: ts, html, scss, md, css, json, js, bzl, yml, sh, mjs, gitignore, editorconfig, svg, patch, npmrc, yaml, cjs, txt, prettierignore
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (38 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 ".*[.]import[.](css|less|scss|styl)" (Stylesheets imported from packages) (126 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (4 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.

main135053 LOC (45%) 3302 files
test129679 LOC (44%) 507 files
generated0 LOC (0%) 0 files
build and deployment269 LOC (<1%) 11 files
other29167 LOC (9%) 352 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 ".*".
  • 3302 files match defined criteria (135,053 lines of code, 100.0% vs. main code):
    • 2,061 *.ts files (93,838 lines of code)
    • 576 *.html files (18,157 lines of code)
    • 368 *.scss files (17,465 lines of code)
    • 245 *.css files (2,800 lines of code)
    • 18 *.bzl files (1,440 lines of code)
    • 24 *.js files (986 lines of code)
    • 9 *.mjs files (349 lines of code)
    • 1 *.yaml files (18 lines of code)
  • " *.ts" is biggest, containing 69.48% of code.
  • " *.yaml" is smallest, containing 0.01% of code.


*.ts93838 LOC (69%) 2061 files
*.html18157 LOC (13%) 576 files
*.scss17465 LOC (12%) 368 files
*.css2800 LOC (2%) 245 files
*.bzl1440 LOC (1%) 18 files
*.js986 LOC (<1%) 24 files
*.mjs349 LOC (<1%) 9 files
*.yaml18 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 ".*[-]tests[-].*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/protractor[.]conf[.]js".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
    • files with paths like ".*/mock[-].*".
  • 507 files match defined criteria (129,679 lines of code, 96.0% vs. main code):
    • 486 *.ts files (128,618 lines of code)
    • 7 *.js files (296 lines of code)
    • 4 *.scss files (281 lines of code)
    • 7 *.html files (271 lines of code)
    • 1 *.mjs files (165 lines of code)
    • 2 *.bzl files (48 lines of code)
  • " *.ts" is biggest, containing 99.18% of code.
  • " *.bzl" is smallest, containing 0.04% of code.


*.ts128618 LOC (99%) 486 files
*.js296 LOC (<1%) 7 files
*.scss281 LOC (<1%) 4 files
*.html271 LOC (<1%) 7 files
*.mjs165 LOC (<1%) 1 files
*.bzl48 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
  • 11 files match defined criteria (269 lines of code, 0.2% vs. main code). All matches are in *.sh files.


*.sh269 LOC (100%) 11 files
Other Code
patch
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]svg".
  • 352 files match defined criteria (29,167 lines of code, 21.6% vs. main code):
    • 262 *.md files (25,569 lines of code)
    • 86 *.json files (3,533 lines of code)
    • 2 *.patch files (57 lines of code)
    • 2 *.svg files (8 lines of code)
  • " *.md" is biggest, containing 87.66% of code.
  • " *.svg" is smallest, containing 0.03% of code.


*.md25569 LOC (87%) 262 files
*.json3533 LOC (12%) 86 files
*.patch57 LOC (<1%) 2 files
*.svg8 LOC (<1%) 2 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
  • *.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
  • *.scss files are analyzed with ScssAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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
  • *.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


2022-02-03 09:30