mozilla / glean
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
plist
pro
txt
properties
storyboard
hbs
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.

main27591 LOC (50%) 263 files
test16802 LOC (30%) 108 files
generated0 LOC (0%) 0 files
build and deployment969 LOC (1%) 19 files
other9811 LOC (17%) 75 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
pro
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 263 files match defined criteria (27,591 LOC, 100.0% vs. main code):
    • 93 *.rs files (15,143 LOC)
    • 55 *.swift files (4,289 LOC)
    • 44 *.py files (2,397 LOC)
    • 5 *.yaml files (1,922 LOC)
    • 43 *.kt files (1,593 LOC)
    • 16 *.toml files (1,098 LOC)
    • 3 *.xml files (733 LOC)
    • 1 *.groovy files (393 LOC)
    • 2 *.pro files (19 LOC)
    • 1 *.h files (4 LOC)
  • " *.rs" is biggest, containing 54.88% of LOC.
  • " *.h" is smallest, containing 0.01% of LOC.


*.rs15143 LOC (54%) 93 files
*.swift4289 LOC (15%) 55 files
*.py2397 LOC (8%) 44 files
*.yaml1922 LOC (6%) 5 files
*.kt1593 LOC (5%) 43 files
*.toml1098 LOC (3%) 16 files
*.xml733 LOC (2%) 3 files
*.groovy393 LOC (1%) 1 file
*.pro19 LOC (<1%) 2 files
*.h4 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 ".*/testing[.].*".
    • files with paths like ".*/src/androidTest/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/test_.*".
  • 108 files match defined criteria (16,802 LOC, 60.9% vs. main code):
    • 42 *.rs files (7,578 LOC)
    • 33 *.kt files (5,737 LOC)
    • 20 *.py files (2,793 LOC)
    • 4 *.yaml files (403 LOC)
    • 6 *.sh files (181 LOC)
    • 3 *.java files (110 LOC)
  • " *.rs" is biggest, containing 45.1% of LOC.
  • " *.java" is smallest, containing 0.65% of LOC.


*.rs7578 LOC (45%) 42 files
*.kt5737 LOC (34%) 33 files
*.py2793 LOC (16%) 20 files
*.yaml403 LOC (2%) 4 files
*.sh181 LOC (1%) 6 files
*.java110 LOC (<1%) 3 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 ".*[.]bat".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/AndroidManifest[.]xml".
  • 19 files match defined criteria (969 LOC, 3.5% vs. main code):
    • 7 *.gradle files (598 LOC)
    • 9 *.sh files (287 LOC)
    • 1 *.bat files (73 LOC)
    • 2 *.xml files (11 LOC)
  • " *.gradle" is biggest, containing 61.71% of LOC.
  • " *.xml" is smallest, containing 1.14% of LOC.


*.gradle598 LOC (61%) 7 files
*.sh287 LOC (29%) 9 files
*.bat73 LOC (7%) 1 file
*.xml11 LOC (1%) 2 files
Other Code
plist
storyboard
properties
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]storyboard".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
  • 75 files match defined criteria (9,811 LOC, 35.6% vs. main code):
    • 16 *.md files (5,975 LOC)
    • 9 *.rs files (967 LOC)
    • 9 *.yaml files (733 LOC)
    • 3 *.json files (704 LOC)
    • 8 *.swift files (397 LOC)
    • 8 *.kt files (386 LOC)
    • 7 *.plist files (167 LOC)
    • 1 *.sh files (138 LOC)
    • 4 *.xml files (120 LOC)
    • 2 *.storyboard files (95 LOC)
    • 1 *.gradle files (49 LOC)
    • 2 *.properties files (25 LOC)
    • 1 *.py files (21 LOC)
    • 2 *.toml files (17 LOC)
    • 2 *.txt files (17 LOC)
  • " *.md" is biggest, containing 60.9% of LOC.
  • " *.txt" is smallest, containing 0.17% of LOC.


*.md5975 LOC (60%) 16 files
*.rs967 LOC (9%) 9 files
*.yaml733 LOC (7%) 9 files
*.json704 LOC (7%) 3 files
*.swift397 LOC (4%) 8 files
*.kt386 LOC (3%) 8 files
*.plist167 LOC (1%) 7 files
*.sh138 LOC (1%) 1 file
*.xml120 LOC (1%) 4 files
*.storyboard95 LOC (<1%) 2 files
*.gradle49 LOC (<1%) 1 file
*.properties25 LOC (<1%) 2 files
*.py21 LOC (<1%) 1 file
*.toml17 LOC (<1%) 2 files
*.txt17 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-11 19:49