gitlab-org / libpg_query
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
patch
txt
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.

main76620 LOC (97%) 366 files
test563 LOC (<1%) 9 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other1256 LOC (1%) 11 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 366 files match defined criteria (76,620 LOC, 100.0% vs. main code):
    • 304 *.h files (41,933 LOC)
    • 58 *.c files (33,768 LOC)
    • 4 *.rb files (919 LOC)
  • " *.h" is biggest, containing 54.73% of LOC.
  • " *.rb" is smallest, containing 1.2% of LOC.


*.h41933 LOC (54%) 304 files
*.c33768 LOC (44%) 58 files
*.rb919 LOC (1%) 4 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 ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
  • 9 files match defined criteria (563 LOC, 0.7% vs. main code):
    • 7 *.c files (281 LOC)
    • 1 *.sql files (262 LOC)
    • 1 *.rb files (20 LOC)
  • " *.c" is biggest, containing 49.91% of LOC.
  • " *.rb" is smallest, containing 3.55% of LOC.


*.c281 LOC (49%) 7 files
*.sql262 LOC (46%) 1 file
*.rb20 LOC (3%) 1 file
Other Code
patch
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 ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]patch".
  • 11 files match defined criteria (1,256 LOC, 1.6% vs. main code):
    • 3 *.json files (592 LOC)
    • 1 *.patch files (378 LOC)
    • 2 *.md files (191 LOC)
    • 5 *.c files (95 LOC)
  • " *.json" is biggest, containing 47.13% of LOC.
  • " *.c" is smallest, containing 7.56% of LOC.


*.json592 LOC (47%) 3 files
*.patch378 LOC (30%) 1 file
*.md191 LOC (15%) 2 files
*.c95 LOC (7%) 5 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-16 13:34