gitlab-org / Git
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
po
tcl
txt
cocci
patch
diff
in
gitattributes
t
xsl
mbox
el
editorconfig
tcsh
plist
mak
m4
clang-format
gitmodules
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.

main343601 LOC (44%) 1,060 files
test9272 LOC (1%) 56 files
generated0 LOC (0%) 0 files
build and deployment258703 LOC (33%) 1,234 files
other158699 LOC (20%) 1,044 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tcl
cocci
mbox
in
tcsh
t
el
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1060 files match defined criteria (343,601 LOC, 100.0% vs. main code):
    • 573 *.c files (271,773 LOC)
    • 319 *.h files (23,173 LOC)
    • 21 *.perl files (18,765 LOC)
    • 40 *.tcl files (11,193 LOC)
    • 21 *.pm files (6,470 LOC)
    • 2 *.bash files (3,206 LOC)
    • 2 *.py files (3,203 LOC)
    • 14 *.pl files (1,457 LOC)
    • 20 *.cocci files (1,025 LOC)
    • 7 *.js files (781 LOC)
    • 3 *.mbox files (709 LOC)
    • 1 *.css files (540 LOC)
    • 4 *.go files (421 LOC)
    • 1 *.zsh files (233 LOC)
    • 14 *.in files (205 LOC)
    • 5 *.rs files (178 LOC)
    • 1 *.tcsh files (109 LOC)
    • 7 *.t files (109 LOC)
    • 2 *.toml files (29 LOC)
    • 2 *.el files (12 LOC)
    • 1 *.ps1 files (10 LOC)
  • " *.c" is biggest, containing 79.1% of LOC.
  • " *.ps1" is smallest, containing 0% of LOC.


*.c271773 LOC (79%) 573 files
*.h23173 LOC (6%) 319 files
*.perl18765 LOC (5%) 21 files
*.tcl11193 LOC (3%) 40 files
*.pm6470 LOC (1%) 21 files
*.bash3206 LOC (<1%) 2 files
*.py3203 LOC (<1%) 2 files
*.pl1457 LOC (<1%) 14 files
*.cocci1025 LOC (<1%) 20 files
*.js781 LOC (<1%) 7 files
*.mbox709 LOC (<1%) 3 files
*.css540 LOC (<1%) 1 file
*.go421 LOC (<1%) 4 files
*.zsh233 LOC (<1%) 1 file
*.in205 LOC (<1%) 14 files
*.rs178 LOC (<1%) 5 files
*.tcsh109 LOC (<1%) 1 file
*.t109 LOC (<1%) 7 files
*.toml29 LOC (<1%) 2 files
*.el12 LOC (<1%) 2 files
*.ps110 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 ".*[-]tests/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Tt]ests/.*".
  • 56 files match defined criteria (9,272 LOC, 2.7% vs. main code):
    • 32 *.c files (6,896 LOC)
    • 11 *.h files (1,026 LOC)
    • 8 *.sh files (862 LOC)
    • 3 *.pl files (297 LOC)
    • 1 *.py files (187 LOC)
    • 1 *.perl files (4 LOC)
  • " *.c" is biggest, containing 74.37% of LOC.
  • " *.perl" is smallest, containing 0.04% of LOC.


*.c6896 LOC (74%) 32 files
*.h1026 LOC (11%) 11 files
*.sh862 LOC (9%) 8 files
*.pl297 LOC (3%) 3 files
*.py187 LOC (2%) 1 file
*.perl4 LOC (<1%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
mak
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 ".*/[.]gitattributes".
    • files with paths like ".*[.]mak".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/[.]gitmodules".
  • 1234 files match defined criteria (258,703 LOC, 75.3% vs. main code):
    • 1,230 *.sh files (258,359 LOC)
    • 3 *.bat files (235 LOC)
    • 1 *.mak files (109 LOC)
  • " *.sh" is biggest, containing 99.87% of LOC.
  • " *.mak" is smallest, containing 0.04% of LOC.


*.sh258359 LOC (99%) 1,230 files
*.bat235 LOC (<1%) 3 files
*.mak109 LOC (<1%) 1 file
Other Code
po
patch
txt
in
diff
xsl
plist
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]diff".
    • files with paths like ".*[.]po".
    • files with paths like ".*[.]adoc".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]plist".
  • 1044 files match defined criteria (158,699 LOC, 46.2% vs. main code):
    • 912 *.adoc files (106,052 LOC)
    • 38 *.po files (46,529 LOC)
    • 18 *.patch files (2,146 LOC)
    • 25 *.txt files (1,763 LOC)
    • 9 *.md files (920 LOC)
    • 8 *.sh files (360 LOC)
    • 6 *.perl files (307 LOC)
    • 1 *.css files (243 LOC)
    • 3 *.in files (205 LOC)
    • 18 *.diff files (100 LOC)
    • 5 *.xsl files (44 LOC)
    • 1 *.plist files (30 LOC)
  • " *.adoc" is biggest, containing 66.83% of LOC.
  • " *.plist" is smallest, containing 0.02% of LOC.


*.adoc106052 LOC (66%) 912 files
*.po46529 LOC (29%) 38 files
*.patch2146 LOC (1%) 18 files
*.txt1763 LOC (1%) 25 files
*.md920 LOC (<1%) 9 files
*.sh360 LOC (<1%) 8 files
*.perl307 LOC (<1%) 6 files
*.css243 LOC (<1%) 1 file
*.in205 LOC (<1%) 3 files
*.diff100 LOC (<1%) 18 files
*.xsl44 LOC (<1%) 5 files
*.plist30 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-16 13:41