guardian / dotcom-rendering
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
snap
editorconfig
eslintignore
patch
npmrc
txt
prettierignore
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.

main198497 LOC (67%) 1,584 files
test25967 LOC (8%) 209 files
generated47960 LOC (16%) 22 files
build and deployment1257 LOC (<1%) 20 files
other21656 LOC (7%) 131 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 ".*".
  • 1584 files match defined criteria (198,497 LOC, 100.0% vs. main code):
    • 1,082 *.tsx files (142,678 LOC)
    • 467 *.ts files (52,755 LOC)
    • 3 *.html files (1,331 LOC)
    • 15 *.js files (772 LOC)
    • 12 *.mjs files (716 LOC)
    • 3 *.yaml files (144 LOC)
    • 2 *.css files (101 LOC)
  • " *.tsx" is biggest, containing 71.88% of LOC.
  • " *.css" is smallest, containing 0.05% of LOC.


*.tsx142678 LOC (71%) 1,082 files
*.ts52755 LOC (26%) 467 files
*.html1331 LOC (<1%) 3 files
*.js772 LOC (<1%) 15 files
*.mjs716 LOC (<1%) 12 files
*.yaml144 LOC (<1%) 3 files
*.css101 LOC (<1%) 2 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 ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/testing[.].*".
    • files with paths like ".*/test[-]data/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*[.]snap".
    • files with paths like ".*/__mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/[Mm]ocks/.*".
  • 209 files match defined criteria (25,967 LOC, 13.1% vs. main code):
    • 140 *.ts files (15,357 LOC)
    • 61 *.tsx files (6,080 LOC)
    • 3 *.snap files (4,007 LOC)
    • 5 *.js files (523 LOC)
  • " *.ts" is biggest, containing 59.14% of LOC.
  • " *.js" is smallest, containing 2.01% of LOC.


*.ts15357 LOC (59%) 140 files
*.tsx6080 LOC (23%) 61 files
*.snap4007 LOC (15%) 3 files
*.js523 LOC (2%) 5 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/generated/.*".
  • 22 files match defined criteria (47,960 LOC, 24.2% vs. main code):
    • 20 *.ts files (47,919 LOC)
    • 1 *.jsx files (24 LOC)
    • 1 *.tsx files (17 LOC)
  • " *.ts" is biggest, containing 99.91% of LOC.
  • " *.tsx" is smallest, containing 0.04% of LOC.


*.ts47919 LOC (99%) 20 files
*.jsx24 LOC (<1%) 1 file
*.tsx17 LOC (<1%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
mjs
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 ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/pnpm.*[.]ya?ml".
  • 20 files match defined criteria (1,257 LOC, 0.6% vs. main code):
    • 8 *.mjs files (631 LOC)
    • 6 *.js files (357 LOC)
    • 1 *.ts files (220 LOC)
    • 3 *.sh files (33 LOC)
    • 1 *.cjs files (12 LOC)
    • 1 *.yaml files (4 LOC)
  • " *.mjs" is biggest, containing 50.2% of LOC.
  • " *.yaml" is smallest, containing 0.32% of LOC.


*.mjs631 LOC (50%) 8 files
*.js357 LOC (28%) 6 files
*.ts220 LOC (17%) 1 file
*.sh33 LOC (2%) 3 files
*.cjs12 LOC (<1%) 1 file
*.yaml4 LOC (<1%) 1 file
Other Code
patch
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/vendor/.*".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]patch".
  • 131 files match defined criteria (21,656 LOC, 10.9% vs. main code):
    • 25 *.json files (20,634 LOC)
    • 14 *.md files (749 LOC)
    • 91 *.svg files (241 LOC)
    • 1 *.patch files (32 LOC)
  • " *.json" is biggest, containing 95.28% of LOC.
  • " *.patch" is smallest, containing 0.15% of LOC.


*.json20634 LOC (95%) 25 files
*.md749 LOC (3%) 14 files
*.svg241 LOC (1%) 91 files
*.patch32 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-09 20:49