gitlab-org / gitlab-runner
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
hcl
tpl
mk
gitattributes
editorconfig
ini
proto
cmd
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.

main60796 LOC (43%) 530 files
test67544 LOC (48%) 252 files
generated0 LOC (0%) 0 files
build and deployment151 LOC (<1%) 2 files
other9938 LOC (7%) 32 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
hcl
proto
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 530 files match defined criteria (60,796 LOC, 100.0% vs. main code):
    • 519 *.go files (60,491 LOC)
    • 2 *.hcl files (195 LOC)
    • 6 *.ps1 files (52 LOC)
    • 1 *.proto files (36 LOC)
    • 2 *.tpl files (22 LOC)
  • " *.go" is biggest, containing 99.5% of LOC.
  • " *.tpl" is smallest, containing 0.04% of LOC.


*.go60491 LOC (99%) 519 files
*.hcl195 LOC (<1%) 2 files
*.ps152 LOC (<1%) 6 files
*.proto36 LOC (<1%) 1 file
*.tpl22 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
hcl
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 ".*[-]test[-].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_tests[.].*".
  • 252 files match defined criteria (67,544 LOC, 111.1% vs. main code):
    • 244 *.go files (67,352 LOC)
    • 6 *.sh files (122 LOC)
    • 1 *.ps1 files (48 LOC)
    • 1 *.hcl files (22 LOC)
  • " *.go" is biggest, containing 99.72% of LOC.
  • " *.hcl" is smallest, containing 0.03% of LOC.


*.go67352 LOC (99%) 244 files
*.sh122 LOC (<1%) 6 files
*.ps148 LOC (<1%) 1 file
*.hcl22 LOC (<1%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
mk
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
  • 2 files match defined criteria (151 LOC, 0.2% vs. main code). All matches are in *.mk files.


*.mk151 LOC (100%) 2 files
Other Code
mod
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]dockerignore".
  • 32 files match defined criteria (9,938 LOC, 16.3% vs. main code):
    • 27 *.md files (9,440 LOC)
    • 3 *.mod files (300 LOC)
    • 2 *.json files (198 LOC)
  • " *.md" is biggest, containing 94.99% of LOC.
  • " *.json" is smallest, containing 1.99% of LOC.


*.md9440 LOC (94%) 27 files
*.mod300 LOC (3%) 3 files
*.json198 LOC (1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-16 13:48