uber / cosmo
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
mod
tpl
proto
properties
eslintignore
mjs
hcl
npmignore
patch
editorconfig
npmrc
prettierignore
snap
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.

main144321 LOC (22%) 1,150 files
test77611 LOC (11%) 250 files
generated58718 LOC (8%) 31 files
build and deployment254 LOC (<1%) 27 files
other372070 LOC (56%) 403 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
tpl
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1150 files match defined criteria (144,321 LOC, 100.0% vs. main code):
    • 458 *.ts files (66,695 LOC)
    • 207 *.tsx files (40,392 LOC)
    • 161 *.go files (23,321 LOC)
    • 86 *.yaml files (4,521 LOC)
    • 5 *.proto files (2,889 LOC)
    • 167 *.sql files (2,758 LOC)
    • 17 *.ftl files (816 LOC)
    • 13 *.js files (626 LOC)
    • 14 *.tf files (606 LOC)
    • 7 *.tpl files (557 LOC)
    • 5 *.css files (528 LOC)
    • 3 *.mjs files (198 LOC)
    • 1 *.scss files (184 LOC)
    • 1 *.html files (128 LOC)
    • 3 *.toml files (87 LOC)
    • 1 *.jsx files (13 LOC)
    • 1 *.xml files (2 LOC)
  • " *.ts" is biggest, containing 46.21% of LOC.
  • " *.xml" is smallest, containing 0% of LOC.


*.ts66695 LOC (46%) 458 files
*.tsx40392 LOC (27%) 207 files
*.go23321 LOC (16%) 161 files
*.yaml4521 LOC (3%) 86 files
*.proto2889 LOC (2%) 5 files
*.sql2758 LOC (1%) 167 files
*.ftl816 LOC (<1%) 17 files
*.js626 LOC (<1%) 13 files
*.tf606 LOC (<1%) 14 files
*.tpl557 LOC (<1%) 7 files
*.css528 LOC (<1%) 5 files
*.mjs198 LOC (<1%) 3 files
*.scss184 LOC (<1%) 1 file
*.html128 LOC (<1%) 1 file
*.toml87 LOC (<1%) 3 files
*.jsx13 LOC (<1%) 1 file
*.xml2 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]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test[-]data/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*/vitest[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/e2e/.*".
  • 250 files match defined criteria (77,611 LOC, 53.8% vs. main code):
    • 114 *.ts files (50,553 LOC)
    • 98 *.go files (26,047 LOC)
    • 29 *.graphql files (880 LOC)
    • 6 *.yaml files (114 LOC)
    • 3 *.sh files (17 LOC)
  • " *.ts" is biggest, containing 65.14% of LOC.
  • " *.sh" is smallest, containing 0.02% of LOC.


*.ts50553 LOC (65%) 114 files
*.go26047 LOC (33%) 98 files
*.graphql880 LOC (1%) 29 files
*.yaml114 LOC (<1%) 6 files
*.sh17 LOC (<1%) 3 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 ".*/generated/.*".
    • files with paths like ".*/gen/.*[.]go".
    • files with paths like ".*/package[-]lock[.]json".
  • 31 files match defined criteria (58,718 LOC, 40.7% vs. main code):
    • 30 *.go files (54,130 LOC)
    • 1 *.json files (4,588 LOC)
  • " *.go" is biggest, containing 92.19% of LOC.
  • " *.json" is smallest, containing 7.81% of LOC.


*.go54130 LOC (92%) 30 files
*.json4588 LOC (7%) 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 ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/pnpm.*[.]ya?ml".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*/package[-]lock[.]json".
  • 27 files match defined criteria (254 LOC, 0.2% vs. main code):
    • 25 *.sh files (230 LOC)
    • 1 *.yaml files (13 LOC)
    • 1 *.xml files (11 LOC)
  • " *.sh" is biggest, containing 90.55% of LOC.
  • " *.xml" is smallest, containing 4.33% of LOC.


*.sh230 LOC (90%) 25 files
*.yaml13 LOC (5%) 1 file
*.xml11 LOC (4%) 1 file
Other Code
mod
properties
txt
patch
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]npmrc".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]properties".
  • 403 files match defined criteria (372,070 LOC, 257.8% vs. main code):
    • 158 *.json files (315,677 LOC)
    • 114 *.go files (44,632 LOC)
    • 76 *.md files (8,942 LOC)
    • 10 *.graphqls files (1,423 LOC)
    • 7 *.mod files (711 LOC)
    • 4 *.properties files (164 LOC)
    • 6 *.txt files (132 LOC)
    • 1 *.graphql files (127 LOC)
    • 6 *.yaml files (123 LOC)
    • 12 *.sh files (72 LOC)
    • 8 *.tf files (53 LOC)
    • 1 *.patch files (14 LOC)
  • " *.json" is biggest, containing 84.84% of LOC.
  • " *.patch" is smallest, containing 0% of LOC.


*.json315677 LOC (84%) 158 files
*.go44632 LOC (11%) 114 files
*.md8942 LOC (2%) 76 files
*.graphqls1423 LOC (<1%) 10 files
*.mod711 LOC (<1%) 7 files
*.properties164 LOC (<1%) 4 files
*.txt132 LOC (<1%) 6 files
*.graphql127 LOC (<1%) 1 file
*.yaml123 LOC (<1%) 6 files
*.sh72 LOC (<1%) 12 files
*.tf53 LOC (<1%) 8 files
*.patch14 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-03 07:39