twitter / pants
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
properties
txt
babelrc
ini
cfg
eslintignore
feature
asc
xsd
gitattributes
wsdl
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.

main81165 LOC (52%) 1,186 files
test55086 LOC (35%) 920 files
generated1215 LOC (<1%) 1 file
build and deployment616 LOC (<1%) 7 files
other16486 LOC (10%) 363 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1186 files match defined criteria (81,165 LOC, 100.0% vs. main code):
    • 830 *.py files (51,161 LOC)
    • 51 *.rs files (19,390 LOC)
    • 141 *.java files (5,190 LOC)
    • 38 *.mustache files (2,369 LOC)
    • 39 *.scala files (1,641 LOC)
    • 22 *.toml files (460 LOC)
    • 2 *.css files (340 LOC)
    • 21 *.js files (265 LOC)
    • 15 *.proto files (111 LOC)
    • 5 *.xml files (65 LOC)
    • 4 *.cpp files (62 LOC)
    • 4 *.hpp files (35 LOC)
    • 1 *.yaml files (26 LOC)
    • 4 *.thrift files (23 LOC)
    • 4 *.h files (16 LOC)
    • 5 *.c files (11 LOC)
  • " *.py" is biggest, containing 63.03% of LOC.
  • " *.c" is smallest, containing 0.01% of LOC.


*.py51161 LOC (63%) 830 files
*.rs19390 LOC (23%) 51 files
*.java5190 LOC (6%) 141 files
*.mustache2369 LOC (2%) 38 files
*.scala1641 LOC (2%) 39 files
*.toml460 LOC (<1%) 22 files
*.css340 LOC (<1%) 2 files
*.js265 LOC (<1%) 21 files
*.proto111 LOC (<1%) 15 files
*.xml65 LOC (<1%) 5 files
*.cpp62 LOC (<1%) 4 files
*.hpp35 LOC (<1%) 4 files
*.yaml26 LOC (<1%) 1 file
*.thrift23 LOC (<1%) 4 files
*.h16 LOC (<1%) 4 files
*.c11 LOC (<1%) 5 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
wsdl
feature
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[.].*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*[.]feature".
  • 920 files match defined criteria (55,086 LOC, 67.9% vs. main code):
    • 704 *.py files (49,158 LOC)
    • 155 *.java files (5,097 LOC)
    • 28 *.xml files (435 LOC)
    • 14 *.scala files (165 LOC)
    • 3 *.g files (63 LOC)
    • 2 *.js files (52 LOC)
    • 1 *.wsdl files (41 LOC)
    • 9 *.thrift files (37 LOC)
    • 2 *.feature files (20 LOC)
    • 2 *.avsc files (18 LOC)
  • " *.py" is biggest, containing 89.24% of LOC.
  • " *.avsc" is smallest, containing 0.03% of LOC.


*.py49158 LOC (89%) 704 files
*.java5097 LOC (9%) 155 files
*.xml435 LOC (<1%) 28 files
*.scala165 LOC (<1%) 14 files
*.g63 LOC (<1%) 3 files
*.js52 LOC (<1%) 2 files
*.wsdl41 LOC (<1%) 1 file
*.thrift37 LOC (<1%) 9 files
*.feature20 LOC (<1%) 2 files
*.avsc18 LOC (<1%) 2 files
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 ".*/npm[-]shrinkwrap[.]json".
  • 1 file matches defined criteria (1,215 LOC, 1.5% vs. main code). All matches are in *.json files.


*.json1215 LOC (100%) 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*/[.]gitattributes".
  • 7 files match defined criteria (616 LOC, 0.8% vs. main code):
    • 3 *.xml files (434 LOC)
    • 4 *.sh files (182 LOC)
  • " *.xml" is biggest, containing 70.45% of LOC.
  • " *.sh" is smallest, containing 29.55% of LOC.


*.xml434 LOC (70%) 3 files
*.sh182 LOC (29%) 4 files
Other Code
ini
properties
proto
txt
xsd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/checkstyle.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/resources/.*[.]xsd".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 363 files match defined criteria (16,486 LOC, 20.3% vs. main code):
    • 19 *.rst files (7,142 LOC)
    • 88 *.md files (4,231 LOC)
    • 36 *.json files (1,880 LOC)
    • 37 *.py files (928 LOC)
    • 40 *.java files (599 LOC)
    • 5 *.ini files (460 LOC)
    • 25 *.js files (274 LOC)
    • 31 *.properties files (216 LOC)
    • 18 *.scala files (157 LOC)
    • 13 *.proto files (157 LOC)
    • 12 *.go files (138 LOC)
    • 2 *.g files (78 LOC)
    • 9 *.thrift files (62 LOC)
    • 18 *.txt files (52 LOC)
    • 3 *.cc files (31 LOC)
    • 1 *.cpp files (30 LOC)
    • 3 *.xml files (24 LOC)
    • 1 *.h files (10 LOC)
    • 1 *.xsd files (10 LOC)
    • 1 *.css files (7 LOC)
  • " *.rst" is biggest, containing 43.32% of LOC.
  • " *.css" is smallest, containing 0.04% of LOC.


*.rst7142 LOC (43%) 19 files
*.md4231 LOC (25%) 88 files
*.json1880 LOC (11%) 36 files
*.py928 LOC (5%) 37 files
*.java599 LOC (3%) 40 files
*.ini460 LOC (2%) 5 files
*.js274 LOC (1%) 25 files
*.properties216 LOC (1%) 31 files
*.scala157 LOC (<1%) 18 files
*.proto157 LOC (<1%) 13 files
*.go138 LOC (<1%) 12 files
*.g78 LOC (<1%) 2 files
*.thrift62 LOC (<1%) 9 files
*.txt52 LOC (<1%) 18 files
*.cc31 LOC (<1%) 3 files
*.cpp30 LOC (<1%) 1 file
*.xml24 LOC (<1%) 3 files
*.h10 LOC (<1%) 1 file
*.xsd10 LOC (<1%) 1 file
*.css7 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-01-17 12:00