mozilla / fxa
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
txt
mjml
prettierignore
eslintignore
lua
ejs
mjs
ini
handlebars
gitattributes
cfg
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.

main249365 LOC (47%) 3,662 files
test243009 LOC (46%) 1,411 files
generated72 LOC (<1%) 2 files
build and deployment1678 LOC (<1%) 52 files
other27676 LOC (5%) 929 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
mjml
mjs
lua
handlebars
ejs
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 3662 files match defined criteria (249,365 LOC, 100.0% vs. main code):
    • 1,327 *.ts files (98,650 LOC)
    • 755 *.js files (67,666 LOC)
    • 578 *.tsx files (52,330 LOC)
    • 412 *.sql files (11,227 LOC)
    • 25 *.yaml files (4,499 LOC)
    • 56 *.scss files (3,981 LOC)
    • 268 *.ftl files (3,013 LOC)
    • 88 *.mjml files (2,248 LOC)
    • 74 *.mustache files (1,991 LOC)
    • 37 *.css files (1,650 LOC)
    • 14 *.html files (827 LOC)
    • 2 *.mjs files (357 LOC)
    • 11 *.lua files (267 LOC)
    • 1 *.gql files (218 LOC)
    • 2 *.pl files (128 LOC)
    • 1 *.handlebars files (112 LOC)
    • 6 *.ejs files (95 LOC)
    • 1 *.cjs files (54 LOC)
    • 2 *.dockerignore files (27 LOC)
    • 1 *.toml files (21 LOC)
    • 1 *.cfg files (4 LOC)
  • " *.ts" is biggest, containing 39.56% of LOC.
  • " *.cfg" is smallest, containing 0% of LOC.


*.ts98650 LOC (39%) 1,327 files
*.js67666 LOC (27%) 755 files
*.tsx52330 LOC (20%) 578 files
*.sql11227 LOC (4%) 412 files
*.yaml4499 LOC (1%) 25 files
*.scss3981 LOC (1%) 56 files
*.ftl3013 LOC (1%) 268 files
*.mjml2248 LOC (<1%) 88 files
*.mustache1991 LOC (<1%) 74 files
*.css1650 LOC (<1%) 37 files
*.html827 LOC (<1%) 14 files
*.mjs357 LOC (<1%) 2 files
*.lua267 LOC (<1%) 11 files
*.gql218 LOC (<1%) 1 file
*.pl128 LOC (<1%) 2 files
*.handlebars112 LOC (<1%) 1 file
*.ejs95 LOC (<1%) 6 files
*.cjs54 LOC (<1%) 1 file
*.dockerignore27 LOC (<1%) 2 files
*.toml21 LOC (<1%) 1 file
*.cfg4 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/tests_.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/__mock[a-zA-Z0-9_\- ]+/.*".
  • 1411 files match defined criteria (243,009 LOC, 97.5% vs. main code):
    • 607 *.js files (149,970 LOC)
    • 512 *.ts files (60,195 LOC)
    • 226 *.tsx files (31,628 LOC)
    • 58 *.sql files (839 LOC)
    • 1 *.py files (230 LOC)
    • 2 *.mustache files (71 LOC)
    • 2 *.sh files (32 LOC)
    • 1 *.ftl files (18 LOC)
    • 1 *.yaml files (15 LOC)
    • 1 *.html files (11 LOC)
  • " *.js" is biggest, containing 61.71% of LOC.
  • " *.html" is smallest, containing 0% of LOC.


*.js149970 LOC (61%) 607 files
*.ts60195 LOC (24%) 512 files
*.tsx31628 LOC (13%) 226 files
*.sql839 LOC (<1%) 58 files
*.py230 LOC (<1%) 1 file
*.mustache71 LOC (<1%) 2 files
*.sh32 LOC (<1%) 2 files
*.ftl18 LOC (<1%) 1 file
*.yaml15 LOC (<1%) 1 file
*.html11 LOC (<1%) 1 file
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__/.*".
  • 2 files match defined criteria (72 LOC, 0.0% vs. main code). All matches are in *.ts files.


*.ts72 LOC (100%) 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 ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
  • 52 files match defined criteria (1,678 LOC, 0.7% vs. main code):
    • 4 *.js files (842 LOC)
    • 48 *.sh files (836 LOC)
  • " *.js" is biggest, containing 50.18% of LOC.
  • " *.sh" is smallest, containing 49.82% of LOC.


*.js842 LOC (50%) 4 files
*.sh836 LOC (49%) 48 files
Other Code
txt
ini
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 ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]dockerignore".
  • 929 files match defined criteria (27,676 LOC, 11.1% vs. main code):
    • 498 *.json files (19,989 LOC)
    • 227 *.svg files (4,536 LOC)
    • 92 *.md files (2,450 LOC)
    • 108 *.txt files (676 LOC)
    • 3 *.ini files (15 LOC)
    • 1 *.js files (10 LOC)
  • " *.json" is biggest, containing 72.23% of LOC.
  • " *.js" is smallest, containing 0.04% of LOC.


*.json19989 LOC (72%) 498 files
*.svg4536 LOC (16%) 227 files
*.md2450 LOC (8%) 92 files
*.txt676 LOC (2%) 108 files
*.ini15 LOC (<1%) 3 files
*.js10 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-11 19:43