facebook / docusaurus
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
mdx
snap
npmignore
mjs
prettierignore
txt
gitattributes
watchmanconfig
stylelintignore
editorconfig
ejs
eslintignore
  • 26 extensions are included in analyses: md, ts, json, tsx, js, mdx, css, snap, yml, svg, npmignore, mjs, html, gitignore, prettierignore, yaml, toml, txt, gitattributes, watchmanconfig, jsx, stylelintignore, sh, editorconfig, ejs, eslintignore
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (72 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (201 files).
    • exclude files with path like ".*/[Jj]avadoc/.*" (Generated documentation) (2 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (38 files).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (4 files).
    • exclude files with path like ".*/[Pp]ackages\/.+\.\d+\/.*" (NuGet) (13 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.

main36387 LOC (34%) 570 files
test32431 LOC (30%) 299 files
generated0 LOC (0%) 0 files
build and deployment1039 LOC (<1%) 12 files
other36344 LOC (34%) 673 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 ".*".
  • 570 files match defined criteria (36,387 lines of code, 100.0% vs. main code):
    • 216 *.ts files (17,735 lines of code)
    • 208 *.tsx files (13,260 lines of code)
    • 86 *.css files (2,047 lines of code)
    • 27 *.js files (1,890 lines of code)
    • 19 *.mjs files (1,287 lines of code)
    • 9 *.yml files (78 lines of code)
    • 2 *.toml files (38 lines of code)
    • 2 *.yaml files (38 lines of code)
    • 1 *.html files (14 lines of code)
  • " *.ts" is biggest, containing 48.74% of code.
  • " *.html" is smallest, containing 0.04% of code.


*.ts17735 LOC (48%) 216 files
*.tsx13260 LOC (36%) 208 files
*.css2047 LOC (5%) 86 files
*.js1890 LOC (5%) 27 files
*.mjs1287 LOC (3%) 19 files
*.yml78 LOC (<1%) 9 files
*.toml38 LOC (<1%) 2 files
*.yaml38 LOC (<1%) 2 files
*.html14 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
snap
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[-]tests[-].*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*[.]snap".
    • files with paths like ".*/__mocks?__/.*".
  • 299 files match defined criteria (32,431 lines of code, 89.1% vs. main code):
    • 119 *.ts files (19,450 lines of code)
    • 50 *.snap files (10,316 lines of code)
    • 35 *.tsx files (1,444 lines of code)
    • 71 *.js files (1,135 lines of code)
    • 12 *.yml files (44 lines of code)
    • 8 *.css files (37 lines of code)
    • 3 *.html files (3 lines of code)
    • 1 *.jsx files (2 lines of code)
  • " *.ts" is biggest, containing 59.97% of code.
  • " *.jsx" is smallest, containing 0.01% of code.


*.ts19450 LOC (59%) 119 files
*.snap10316 LOC (31%) 50 files
*.tsx1444 LOC (4%) 35 files
*.js1135 LOC (3%) 71 files
*.yml44 LOC (<1%) 12 files
*.css37 LOC (<1%) 8 files
*.html3 LOC (<1%) 3 files
*.jsx2 LOC (<1%) 1 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
ejs
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 ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/[.]gitattributes".
  • 12 files match defined criteria (1,039 lines of code, 2.9% vs. main code):
    • 10 *.ts files (988 lines of code)
    • 1 *.sh files (34 lines of code)
    • 1 *.ejs files (17 lines of code)
  • " *.ts" is biggest, containing 95.09% of code.
  • " *.ejs" is smallest, containing 1.64% of code.


*.ts988 LOC (95%) 10 files
*.sh34 LOC (3%) 1 files
*.ejs17 LOC (1%) 1 files
Other Code
mdx
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]mdx".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]stylelintignore".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[.]eslintignore".
  • 673 files match defined criteria (36,344 lines of code, 99.9% vs. main code):
    • 305 *.md files (22,562 lines of code)
    • 77 *.mdx files (7,331 lines of code)
    • 264 *.json files (5,248 lines of code)
    • 12 *.js files (543 lines of code)
    • 1 *.txt files (341 lines of code)
    • 8 *.css files (159 lines of code)
    • 3 *.tsx files (115 lines of code)
    • 3 *.yml files (45 lines of code)
  • " *.md" is biggest, containing 62.08% of code.
  • " *.yml" is smallest, containing 0.12% of code.


*.md22562 LOC (62%) 305 files
*.mdx7331 LOC (20%) 77 files
*.json5248 LOC (14%) 264 files
*.js543 LOC (1%) 12 files
*.txt341 LOC (<1%) 1 files
*.css159 LOC (<1%) 8 files
*.tsx115 LOC (<1%) 3 files
*.yml45 LOC (<1%) 3 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
  • *.tsx 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
  • *.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
  • *.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
  • *.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
  • *.toml 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
  • *.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-04-14 23:20