mozilla / addons-server
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
po
txt
cfg
asc
hcl
jshintrc
ini
babelrc
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.

main101645 LOC (13%) 1,325 files
test111110 LOC (14%) 264 files
generated0 LOC (0%) 0 files
build and deployment189 LOC (<1%) 6 files
other555815 LOC (72%) 348 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
asc
hcl
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1325 files match defined criteria (101,645 LOC, 100.0% vs. main code):
    • 989 *.py files (67,015 LOC)
    • 65 *.less files (9,484 LOC)
    • 38 *.css files (9,469 LOC)
    • 55 *.js files (7,534 LOC)
    • 163 *.html files (7,207 LOC)
    • 3 *.ts files (267 LOC)
    • 1 *.yaml files (234 LOC)
    • 3 *.sql files (133 LOC)
    • 1 *.toml files (99 LOC)
    • 2 *.xml files (84 LOC)
    • 2 *.asc files (79 LOC)
    • 1 *.hcl files (26 LOC)
    • 2 *.cfg files (14 LOC)
  • " *.py" is biggest, containing 65.93% of LOC.
  • " *.cfg" is smallest, containing 0.01% of LOC.


*.py67015 LOC (65%) 989 files
*.less9484 LOC (9%) 65 files
*.css9469 LOC (9%) 38 files
*.js7534 LOC (7%) 55 files
*.html7207 LOC (7%) 163 files
*.ts267 LOC (<1%) 3 files
*.yaml234 LOC (<1%) 1 file
*.sql133 LOC (<1%) 3 files
*.toml99 LOC (<1%) 1 file
*.xml84 LOC (<1%) 2 files
*.asc79 LOC (<1%) 2 files
*.hcl26 LOC (<1%) 1 file
*.cfg14 LOC (<1%) 2 files
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 ".*_test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.]spec[.]js".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/vitest[.].*".
  • 264 files match defined criteria (111,110 LOC, 109.3% vs. main code):
    • 257 *.py files (110,696 LOC)
    • 5 *.js files (395 LOC)
    • 1 *.ts files (16 LOC)
    • 1 *.xml files (3 LOC)
  • " *.py" is biggest, containing 99.63% of LOC.
  • " *.xml" is smallest, containing 0% of LOC.


*.py110696 LOC (99%) 257 files
*.js395 LOC (<1%) 5 files
*.ts16 LOC (<1%) 1 file
*.xml3 LOC (<1%) 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 ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
  • 6 files match defined criteria (189 LOC, 0.2% vs. main code). All matches are in *.sh files.


*.sh189 LOC (100%) 6 files
Other Code
po
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 ".*[.]po".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]ini".
  • 348 files match defined criteria (555,815 LOC, 546.8% vs. main code):
    • 184 *.po files (537,933 LOC)
    • 64 *.json files (15,536 LOC)
    • 50 *.txt files (2,073 LOC)
    • 44 *.svg files (165 LOC)
    • 5 *.md files (81 LOC)
    • 1 *.ini files (27 LOC)
  • " *.po" is biggest, containing 96.78% of LOC.
  • " *.ini" is smallest, containing 0% of LOC.


*.po537933 LOC (96%) 184 files
*.json15536 LOC (2%) 64 files
*.txt2073 LOC (<1%) 50 files
*.svg165 LOC (<1%) 44 files
*.md81 LOC (<1%) 5 files
*.ini27 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-11 19:43