mozilla / rust-code-analysis
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
gyp
gitattributes
npmignore
gitmodules
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.

main29836 LOC (46%) 127 files
test218 LOC (<1%) 4 files
generated0 LOC (0%) 0 files
build and deployment85 LOC (<1%) 5 files
other33758 LOC (52%) 53 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
gyp
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 127 files match defined criteria (29,836 LOC, 100.0% vs. main code):
    • 79 *.rs files (22,501 LOC)
    • 4 *.c files (3,934 LOC)
    • 12 *.h files (1,908 LOC)
    • 8 *.js files (592 LOC)
    • 4 *.py files (328 LOC)
    • 9 *.toml files (244 LOC)
    • 6 *.cc files (230 LOC)
    • 4 *.gyp files (72 LOC)
    • 1 *.go files (27 LOC)
  • " *.rs" is biggest, containing 75.42% of LOC.
  • " *.go" is smallest, containing 0.09% of LOC.


*.rs22501 LOC (75%) 79 files
*.c3934 LOC (13%) 4 files
*.h1908 LOC (6%) 12 files
*.js592 LOC (1%) 8 files
*.py328 LOC (1%) 4 files
*.toml244 LOC (<1%) 9 files
*.cc230 LOC (<1%) 6 files
*.gyp72 LOC (<1%) 4 files
*.go27 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 ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
  • 4 files match defined criteria (218 LOC, 0.7% vs. main code). All matches are in *.rs files.


*.rs218 LOC (100%) 4 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitmodules".
  • 5 files match defined criteria (85 LOC, 0.3% vs. main code). All matches are in *.sh files.


*.sh85 LOC (100%) 5 files
Other Code
txt
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 ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*[.]txt".
  • 53 files match defined criteria (33,758 LOC, 113.1% vs. main code):
    • 12 *.json files (20,330 LOC)
    • 6 *.c files (9,640 LOC)
    • 16 *.txt files (3,087 LOC)
    • 19 *.md files (701 LOC)
  • " *.json" is biggest, containing 60.22% of LOC.
  • " *.md" is smallest, containing 2.08% of LOC.


*.json20330 LOC (60%) 12 files
*.c9640 LOC (28%) 6 files
*.txt3087 LOC (9%) 16 files
*.md701 LOC (2%) 19 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-11 19:51