twitter / the-algorithm
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
workflow
ini
cfg
txt
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.

main433772 LOC (97%) 5,739 files
test8328 LOC (1%) 36 files
generated0 LOC (0%) 0 files
build and deployment182 LOC (<1%) 10 files
other2094 LOC (<1%) 90 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
workflow
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 5739 files match defined criteria (433,772 LOC, 100.0% vs. main code):
    • 4,125 *.scala files (288,262 LOC)
    • 1,043 *.java files (97,318 LOC)
    • 179 *.py files (14,804 LOC)
    • 51 *.cpp files (8,518 LOC)
    • 90 *.proto files (7,972 LOC)
    • 112 *.thrift files (6,953 LOC)
    • 26 *.rs files (3,905 LOC)
    • 41 *.h files (2,009 LOC)
    • 16 *.xml files (1,492 LOC)
    • 25 *.workflow files (1,305 LOC)
    • 23 *.sql files (1,082 LOC)
    • 4 *.toml files (123 LOC)
    • 1 *.graphql files (15 LOC)
    • 3 *.cfg files (14 LOC)
  • " *.scala" is biggest, containing 66.45% of LOC.
  • " *.cfg" is smallest, containing 0% of LOC.


*.scala288262 LOC (66%) 4,125 files
*.java97318 LOC (22%) 1,043 files
*.py14804 LOC (3%) 179 files
*.cpp8518 LOC (1%) 51 files
*.proto7972 LOC (1%) 90 files
*.thrift6953 LOC (1%) 112 files
*.rs3905 LOC (<1%) 26 files
*.h2009 LOC (<1%) 41 files
*.xml1492 LOC (<1%) 16 files
*.workflow1305 LOC (<1%) 25 files
*.sql1082 LOC (<1%) 23 files
*.toml123 LOC (<1%) 4 files
*.graphql15 LOC (<1%) 1 file
*.cfg14 LOC (<1%) 3 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 ".*/[Tt]est/.*".
  • 36 files match defined criteria (8,328 LOC, 1.9% vs. main code):
    • 32 *.scala files (8,239 LOC)
    • 3 *.xml files (82 LOC)
    • 1 *.thrift files (7 LOC)
  • " *.scala" is biggest, containing 98.93% of LOC.
  • " *.thrift" is smallest, containing 0.08% of LOC.


*.scala8239 LOC (98%) 32 files
*.xml82 LOC (<1%) 3 files
*.thrift7 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 10 files match defined criteria (182 LOC, 0.0% vs. main code). All matches are in *.sh files.


*.sh182 LOC (100%) 10 files
Other Code
txt
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]ini".
  • 90 files match defined criteria (2,094 LOC, 0.5% vs. main code):
    • 78 *.md files (1,788 LOC)
    • 1 *.rst files (96 LOC)
    • 2 *.txt files (94 LOC)
    • 8 *.ini files (61 LOC)
    • 1 *.json files (55 LOC)
  • " *.md" is biggest, containing 85.39% of LOC.
  • " *.json" is smallest, containing 2.63% of LOC.


*.md1788 LOC (85%) 78 files
*.rst96 LOC (4%) 1 file
*.txt94 LOC (4%) 2 files
*.ini61 LOC (2%) 8 files
*.json55 LOC (2%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-01-17 12:02