gitlab-org / libgit2
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
gitattributes
in
gitmodules
diff
editorconfig
gitconfig
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.

main90954 LOC (52%) 452 files
test76583 LOC (44%) 464 files
generated0 LOC (0%) 0 files
build and deployment126 LOC (<1%) 8 files
other6080 LOC (3%) 158 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 452 files match defined criteria (90,954 LOC, 100.0% vs. main code):
    • 181 *.c files (77,897 LOC)
    • 248 *.h files (11,771 LOC)
    • 20 *.cmake files (1,082 LOC)
    • 1 *.py files (144 LOC)
    • 2 *.in files (60 LOC)
  • " *.c" is biggest, containing 85.64% of LOC.
  • " *.in" is smallest, containing 0.07% of LOC.


*.c77897 LOC (85%) 181 files
*.h11771 LOC (12%) 248 files
*.cmake1082 LOC (1%) 20 files
*.py144 LOC (<1%) 1 file
*.in60 LOC (<1%) 2 files
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]ests/.*".
  • 464 files match defined criteria (76,583 LOC, 84.2% vs. main code):
    • 407 *.c files (72,004 LOC)
    • 43 *.h files (3,677 LOC)
    • 3 *.sh files (387 LOC)
    • 1 *.py files (187 LOC)
    • 5 *.html files (175 LOC)
    • 5 *.php files (153 LOC)
  • " *.c" is biggest, containing 94.02% of LOC.
  • " *.php" is smallest, containing 0.2% of LOC.


*.c72004 LOC (94%) 407 files
*.h3677 LOC (4%) 43 files
*.sh387 LOC (<1%) 3 files
*.py187 LOC (<1%) 1 file
*.html175 LOC (<1%) 5 files
*.php153 LOC (<1%) 5 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 ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitconfig".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
  • 8 files match defined criteria (126 LOC, 0.1% vs. main code). All matches are in *.sh files.


*.sh126 LOC (100%) 8 files
Other Code
txt
diff
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]diff".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]editorconfig".
  • 158 files match defined criteria (6,080 LOC, 6.7% vs. main code):
    • 27 *.c files (3,941 LOC)
    • 119 *.txt files (1,580 LOC)
    • 7 *.md files (394 LOC)
    • 2 *.h files (100 LOC)
    • 2 *.diff files (58 LOC)
    • 1 *.json files (7 LOC)
  • " *.c" is biggest, containing 64.82% of LOC.
  • " *.json" is smallest, containing 0.12% of LOC.


*.c3941 LOC (64%) 27 files
*.txt1580 LOC (25%) 119 files
*.md394 LOC (6%) 7 files
*.h100 LOC (1%) 2 files
*.diff58 LOC (<1%) 2 files
*.json7 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-16 13:37