mozilla / translations
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
mjs
in
patch
gitattributes
ini
clang-format
gitmodules
clang-tidy
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.

main18070 LOC (46%) 162 files
test7408 LOC (19%) 69 files
generated2541 LOC (6%) 1 file
build and deployment1055 LOC (2%) 48 files
other9829 LOC (25%) 51 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
mjs
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 162 files match defined criteria (18,070 LOC, 100.0% vs. main code):
    • 83 *.py files (11,352 LOC)
    • 19 *.cpp files (2,283 LOC)
    • 3 *.mjs files (1,983 LOC)
    • 23 *.h files (1,175 LOC)
    • 3 *.css files (547 LOC)
    • 3 *.html files (226 LOC)
    • 3 *.toml files (160 LOC)
    • 6 *.yaml files (105 LOC)
    • 3 *.perl files (100 LOC)
    • 14 *.in files (54 LOC)
    • 1 *.cmake files (52 LOC)
    • 1 *.js files (33 LOC)
  • " *.py" is biggest, containing 62.82% of LOC.
  • " *.js" is smallest, containing 0.18% of LOC.


*.py11352 LOC (62%) 83 files
*.cpp2283 LOC (12%) 19 files
*.mjs1983 LOC (10%) 3 files
*.h1175 LOC (6%) 23 files
*.css547 LOC (3%) 3 files
*.html226 LOC (1%) 3 files
*.toml160 LOC (<1%) 3 files
*.yaml105 LOC (<1%) 6 files
*.perl100 LOC (<1%) 3 files
*.in54 LOC (<1%) 14 files
*.cmake52 LOC (<1%) 1 file
*.js33 LOC (<1%) 1 file
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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/vitest[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*_tests[.].*".
  • 69 files match defined criteria (7,408 LOC, 41.0% vs. main code):
    • 36 *.py files (4,262 LOC)
    • 19 *.mjs files (1,592 LOC)
    • 11 *.cpp files (1,485 LOC)
    • 3 *.h files (69 LOC)
  • " *.py" is biggest, containing 57.53% of LOC.
  • " *.h" is smallest, containing 0.93% of LOC.


*.py4262 LOC (57%) 36 files
*.mjs1592 LOC (21%) 19 files
*.cpp1485 LOC (20%) 11 files
*.h69 LOC (<1%) 3 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 ".*/package[-]lock[.]json".
  • 1 file matches defined criteria (2,541 LOC, 14.1% vs. main code). All matches are in *.json files.


*.json2541 LOC (100%) 1 file
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 ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/package[-]lock[.]json".
  • 48 files match defined criteria (1,055 LOC, 5.8% vs. main code). All matches are in *.sh files.


*.sh1055 LOC (100%) 48 files
Other Code
txt
ini
patch
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/[Ee]xamples/.*".
  • 51 files match defined criteria (9,829 LOC, 54.4% vs. main code):
    • 21 *.txt files (5,642 LOC)
    • 20 *.json files (3,912 LOC)
    • 1 *.ini files (121 LOC)
    • 3 *.patch files (79 LOC)
    • 3 *.md files (56 LOC)
    • 1 *.svg files (9 LOC)
    • 1 *.sh files (9 LOC)
    • 1 *.rst files (1 LOC)
  • " *.txt" is biggest, containing 57.4% of LOC.
  • " *.rst" is smallest, containing 0.01% of LOC.


*.txt5642 LOC (57%) 21 files
*.json3912 LOC (39%) 20 files
*.ini121 LOC (1%) 1 file
*.patch79 LOC (<1%) 3 files
*.md56 LOC (<1%) 3 files
*.svg9 LOC (<1%) 1 file
*.sh9 LOC (<1%) 1 file
*.rst1 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-11 19:54