spotify / tfx
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
proto
pb
txt
meta
com
in
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.

main42667 LOC (27%) 586 files
test44900 LOC (28%) 308 files
generated0 LOC (0%) 0 files
build and deployment88 LOC (<1%) 4 files
other69547 LOC (44%) 160 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 586 files match defined criteria (42,667 LOC, 100.0% vs. main code):
    • 525 *.py files (39,615 LOC)
    • 27 *.proto files (2,495 LOC)
    • 2 *.ipynb files (230 LOC)
    • 3 *.toml files (119 LOC)
    • 2 *.bzl files (115 LOC)
    • 26 *.yaml files (76 LOC)
    • 1 *.in files (17 LOC)
  • " *.py" is biggest, containing 92.85% of LOC.
  • " *.in" is smallest, containing 0.04% of LOC.


*.py39615 LOC (92%) 525 files
*.proto2495 LOC (5%) 27 files
*.ipynb230 LOC (<1%) 2 files
*.toml119 LOC (<1%) 3 files
*.bzl115 LOC (<1%) 2 files
*.yaml76 LOC (<1%) 26 files
*.in17 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 ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
    • files with paths like ".*/testing[.].*".
  • 308 files match defined criteria (44,900 LOC, 105.2% vs. main code). All matches are in *.py files.


*.py44900 LOC (100%) 308 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 ".*/docker[-]compose[.]yaml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 4 files match defined criteria (88 LOC, 0.2% vs. main code). All matches are in *.sh files.


*.sh88 LOC (100%) 4 files
Other Code
pb
txt
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]pb".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]dockerignore".
  • 160 files match defined criteria (69,547 LOC, 163.0% vs. main code):
    • 4 *.pb files (55,321 LOC)
    • 101 *.py files (7,889 LOC)
    • 37 *.md files (3,935 LOC)
    • 5 *.txt files (1,082 LOC)
    • 1 *.ipynb files (984 LOC)
    • 10 *.sh files (261 LOC)
    • 1 *.proto files (56 LOC)
    • 1 *.yaml files (19 LOC)
  • " *.pb" is biggest, containing 79.54% of LOC.
  • " *.yaml" is smallest, containing 0.03% of LOC.


*.pb55321 LOC (79%) 4 files
*.py7889 LOC (11%) 101 files
*.md3935 LOC (5%) 37 files
*.txt1082 LOC (1%) 5 files
*.ipynb984 LOC (1%) 1 file
*.sh261 LOC (<1%) 10 files
*.proto56 LOC (<1%) 1 file
*.yaml19 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 12:41