Uber / cadence
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
cql
proto
mod
ini
gitattributes
txt
gitmodules
pub
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.

main218187 LOC (52%) 1,087 files
test167067 LOC (40%) 444 files
generated15239 LOC (3%) 64 files
build and deployment693 LOC (<1%) 16 files
other12751 LOC (3%) 119 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
cql
pub
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1087 files match defined criteria (218,187 LOC, 100.0% vs. main code):
    • 892 *.go files (209,036 LOC)
    • 38 *.yaml files (2,352 LOC)
    • 9 *.proto files (2,265 LOC)
    • 30 *.yml files (1,916 LOC)
    • 83 *.cql files (1,495 LOC)
    • 33 *.sql files (1,026 LOC)
    • 1 *.toml files (88 LOC)
    • 1 *.pub files (9 LOC)
  • " *.go" is biggest, containing 95.81% of LOC.
  • " *.pub" is smallest, containing 0% of LOC.


*.go209036 LOC (95%) 892 files
*.yaml2352 LOC (1%) 38 files
*.proto2265 LOC (1%) 9 files
*.yml1916 LOC (<1%) 30 files
*.cql1495 LOC (<1%) 83 files
*.sql1026 LOC (<1%) 33 files
*.toml88 LOC (<1%) 1 file
*.pub9 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 ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*/[Tt]ests/.*".
  • 444 files match defined criteria (167,067 LOC, 76.6% vs. main code):
    • 443 *.go files (167,049 LOC)
    • 1 *.sh files (18 LOC)
  • " *.go" is biggest, containing 99.99% of LOC.
  • " *.sh" is smallest, containing 0.01% of LOC.


*.go167049 LOC (99%) 443 files
*.sh18 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 ".*_generated[.][a-z]+".
  • 64 files match defined criteria (15,239 LOC, 7.0% vs. main code). All matches are in *.go files.


*.go15239 LOC (100%) 64 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 ".*/docker[-]compose[.]yml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
  • 16 files match defined criteria (693 LOC, 0.3% vs. main code):
    • 2 *.yml files (394 LOC)
    • 14 *.sh files (299 LOC)
  • " *.yml" is biggest, containing 56.85% of LOC.
  • " *.sh" is smallest, containing 43.15% of LOC.


*.yml394 LOC (56%) 2 files
*.sh299 LOC (43%) 14 files
Other Code
mod
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[.]gitignore".
  • 119 files match defined criteria (12,751 LOC, 5.8% vs. main code):
    • 90 *.json files (9,624 LOC)
    • 24 *.md files (2,449 LOC)
    • 4 *.mod files (675 LOC)
    • 1 *.ini files (3 LOC)
  • " *.json" is biggest, containing 75.48% of LOC.
  • " *.ini" is smallest, containing 0.02% of LOC.


*.json9624 LOC (75%) 90 files
*.md2449 LOC (19%) 24 files
*.mod675 LOC (5%) 4 files
*.ini3 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2024-04-03 14:34