apache / buildstream
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
pyi
proto
in
patch
diff
gitattributes
pxd
ini
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.

main31055 LOC (51%) 272 files
test19006 LOC (31%) 271 files
generated143 LOC (<1%) 6 files
build and deployment0 LOC (0%) 0 files
other9902 LOC (16%) 222 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
pyi
in
pxd
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 272 files match defined criteria (31,055 LOC, 100.0% vs. main code):
    • 177 *.py files (22,681 LOC)
    • 12 *.proto files (3,854 LOC)
    • 6 *.pyx files (1,467 LOC)
    • 41 *.html files (945 LOC)
    • 1 *.c files (837 LOC)
    • 17 *.pyi files (786 LOC)
    • 7 *.yaml files (162 LOC)
    • 7 *.in files (159 LOC)
    • 1 *.pxd files (63 LOC)
    • 1 *.toml files (62 LOC)
    • 1 *.cfg files (30 LOC)
    • 1 *.h files (9 LOC)
  • " *.py" is biggest, containing 73.03% of LOC.
  • " *.h" is smallest, containing 0.03% of LOC.


*.py22681 LOC (73%) 177 files
*.proto3854 LOC (12%) 12 files
*.pyx1467 LOC (4%) 6 files
*.html945 LOC (3%) 41 files
*.c837 LOC (2%) 1 file
*.pyi786 LOC (2%) 17 files
*.yaml162 LOC (<1%) 7 files
*.in159 LOC (<1%) 7 files
*.pxd63 LOC (<1%) 1 file
*.toml62 LOC (<1%) 1 file
*.cfg30 LOC (<1%) 1 file
*.h9 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
in
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 ".*/test_.*".
  • 271 files match defined criteria (19,006 LOC, 61.2% vs. main code):
    • 227 *.py files (18,597 LOC)
    • 28 *.yaml files (245 LOC)
    • 12 *.h files (108 LOC)
    • 2 *.c files (30 LOC)
    • 1 *.sh files (25 LOC)
    • 1 *.in files (1 LOC)
  • " *.py" is biggest, containing 97.85% of LOC.
  • " *.in" is smallest, containing 0.01% of LOC.


*.py18597 LOC (97%) 227 files
*.yaml245 LOC (1%) 28 files
*.h108 LOC (<1%) 12 files
*.c30 LOC (<1%) 2 files
*.sh25 LOC (<1%) 1 file
*.in1 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 ".*[.](py|java|h|cc|cpp|m|rb|php)" AND any line of content like ".*Generated by the protocol buffer compiler[.][ ]+DO NOT EDIT[!].*".
  • 6 files match defined criteria (143 LOC, 0.5% vs. main code). All matches are in *.py files.


*.py143 LOC (100%) 6 files
Other Code
ini
txt
patch
diff
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]diff".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
  • 222 files match defined criteria (9,902 LOC, 31.9% vs. main code):
    • 68 *.rst files (8,647 LOC)
    • 1 *.svg files (499 LOC)
    • 1 *.ini files (233 LOC)
    • 7 *.py files (210 LOC)
    • 122 *.txt files (164 LOC)
    • 13 *.c files (113 LOC)
    • 2 *.patch files (17 LOC)
    • 2 *.diff files (12 LOC)
    • 5 *.h files (5 LOC)
    • 1 *.sh files (2 LOC)
  • " *.rst" is biggest, containing 87.33% of LOC.
  • " *.sh" is smallest, containing 0.02% of LOC.


*.rst8647 LOC (87%) 68 files
*.svg499 LOC (5%) 1 file
*.ini233 LOC (2%) 1 file
*.py210 LOC (2%) 7 files
*.txt164 LOC (1%) 122 files
*.c113 LOC (1%) 13 files
*.patch17 LOC (<1%) 2 files
*.diff12 LOC (<1%) 2 files
*.h5 LOC (<1%) 5 files
*.sh2 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 20:23