apache / cloudberry
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
txt
spec
mk
in
feature
m4
l
y
xsl
clang-format
cfg
s
proto
editorconfig
clang-tidy
gitattributes
gv
xs
gdb
plist
sed
man
f
gdbinit
proj
vcxproj
el
wxs
gitmodules
xsd
gp
filters
prolog
xslt
properties
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.

main1446295 LOC (71%) 6,235 files
test502340 LOC (24%) 2,731 files
generated499 LOC (<1%) 3 files
build and deployment3566 LOC (<1%) 54 files
other58757 LOC (2%) 251 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
l
y
in
xsd
wxs
xsl
vcxproj
xs
proto
filters
spec
gv
s
proj
man
prolog
sed
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 6235 files match defined criteria (1,446,295 LOC, 100.0% vs. main code):
    • 1,438 *.c files (921,300 LOC)
    • 1,081 *.cpp files (185,119 LOC)
    • 2,480 *.h files (174,563 LOC)
    • 565 *.sql files (61,194 LOC)
    • 383 *.xml files (40,572 LOC)
    • 101 *.cc files (25,285 LOC)
    • 13 *.l files (7,648 LOC)
    • 63 *.pl files (6,865 LOC)
    • 10 *.y files (6,568 LOC)
    • 12 *.pm files (5,033 LOC)
    • 22 *.py files (2,425 LOC)
    • 16 *.in files (2,201 LOC)
    • 1 *.xsd files (1,554 LOC)
    • 4 *.html files (1,272 LOC)
    • 1 *.wxs files (1,079 LOC)
    • 6 *.xsl files (774 LOC)
    • 1 *.vcxproj files (522 LOC)
    • 4 *.cmake files (424 LOC)
    • 6 *.bash files (344 LOC)
    • 2 *.xs files (317 LOC)
    • 3 *.proto files (216 LOC)
    • 2 *.css files (212 LOC)
    • 1 *.filters files (146 LOC)
    • 3 *.spec files (124 LOC)
    • 2 *.gv files (120 LOC)
    • 4 *.s files (108 LOC)
    • 1 *.d files (76 LOC)
    • 1 *.rb files (58 LOC)
    • 1 *.yaml files (54 LOC)
    • 1 *.proj files (51 LOC)
    • 1 *.man files (30 LOC)
    • 1 *.prolog files (17 LOC)
    • 1 *.sed files (16 LOC)
    • 1 *.inc files (4 LOC)
    • 3 *.cfg files (4 LOC)
  • " *.c" is biggest, containing 63.7% of LOC.
  • " *.cfg" is smallest, containing 0% of LOC.


*.c921300 LOC (63%) 1,438 files
*.cpp185119 LOC (12%) 1,081 files
*.h174563 LOC (12%) 2,480 files
*.sql61194 LOC (4%) 565 files
*.xml40572 LOC (2%) 383 files
*.cc25285 LOC (1%) 101 files
*.l7648 LOC (<1%) 13 files
*.pl6865 LOC (<1%) 63 files
*.y6568 LOC (<1%) 10 files
*.pm5033 LOC (<1%) 12 files
*.py2425 LOC (<1%) 22 files
*.in2201 LOC (<1%) 16 files
*.xsd1554 LOC (<1%) 1 file
*.html1272 LOC (<1%) 4 files
*.wxs1079 LOC (<1%) 1 file
*.xsl774 LOC (<1%) 6 files
*.vcxproj522 LOC (<1%) 1 file
*.cmake424 LOC (<1%) 4 files
*.bash344 LOC (<1%) 6 files
*.xs317 LOC (<1%) 2 files
*.proto216 LOC (<1%) 3 files
*.css212 LOC (<1%) 2 files
*.filters146 LOC (<1%) 1 file
*.spec124 LOC (<1%) 3 files
*.gv120 LOC (<1%) 2 files
*.s108 LOC (<1%) 4 files
*.d76 LOC (<1%) 1 file
*.rb58 LOC (<1%) 1 file
*.yaml54 LOC (<1%) 1 file
*.proj51 LOC (<1%) 1 file
*.man30 LOC (<1%) 1 file
*.prolog17 LOC (<1%) 1 file
*.sed16 LOC (<1%) 1 file
*.inc4 LOC (<1%) 1 file
*.cfg4 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
spec
feature
in
y
l
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • 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 ".*_tests[.].*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
    • files with paths like ".*[.]feature".
    • files with paths like ".*[-]test[-].*".
  • 2731 files match defined criteria (502,340 LOC, 34.7% vs. main code):
    • 2,171 *.sql files (406,587 LOC)
    • 189 *.c files (39,464 LOC)
    • 88 *.pl files (12,453 LOC)
    • 39 *.py files (10,544 LOC)
    • 127 *.spec files (8,186 LOC)
    • 23 *.feature files (7,824 LOC)
    • 17 *.cc files (6,502 LOC)
    • 12 *.pm files (5,012 LOC)
    • 18 *.cpp files (3,468 LOC)
    • 17 *.h files (834 LOC)
    • 13 *.sh files (753 LOC)
    • 15 *.in files (334 LOC)
    • 1 *.y files (249 LOC)
    • 1 *.l files (130 LOC)
  • " *.sql" is biggest, containing 80.94% of LOC.
  • " *.l" is smallest, containing 0.03% of LOC.


*.sql406587 LOC (80%) 2,171 files
*.c39464 LOC (7%) 189 files
*.pl12453 LOC (2%) 88 files
*.py10544 LOC (2%) 39 files
*.spec8186 LOC (1%) 127 files
*.feature7824 LOC (1%) 23 files
*.cc6502 LOC (1%) 17 files
*.pm5012 LOC (<1%) 12 files
*.cpp3468 LOC (<1%) 18 files
*.h834 LOC (<1%) 17 files
*.sh753 LOC (<1%) 13 files
*.in334 LOC (<1%) 15 files
*.y249 LOC (<1%) 1 file
*.l130 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]+".
    • files with any line of content like "\<\!\-\-[ ]*Generated by .*".
    • files with paths like ".*[.](html|html|xhtml)" AND any line of content like "[ ]*[<]meta name[=]"generator" .*".
  • 3 files match defined criteria (499 LOC, 0.0% vs. main code):
    • 2 *.svg files (457 LOC)
    • 1 *.pl files (42 LOC)
  • " *.svg" is biggest, containing 91.58% of LOC.
  • " *.pl" is smallest, containing 8.42% of LOC.


*.svg457 LOC (91%) 2 files
*.pl42 LOC (8%) 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 ".*/pom[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitattributes".
  • 54 files match defined criteria (3,566 LOC, 0.2% vs. main code):
    • 1 *.xml files (1,400 LOC)
    • 25 *.sh files (1,043 LOC)
    • 19 *.mk files (936 LOC)
    • 9 *.bat files (187 LOC)
  • " *.xml" is biggest, containing 39.26% of LOC.
  • " *.bat" is smallest, containing 5.24% of LOC.


*.xml1400 LOC (39%) 1 file
*.sh1043 LOC (29%) 25 files
*.mk936 LOC (26%) 19 files
*.bat187 LOC (5%) 9 files
Other Code
po
txt
spec
gp
plist
in
properties
mk
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]po".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]plist".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]editorconfig".
  • 251 files match defined criteria (58,757 LOC, 4.1% vs. main code):
    • 75 *.po files (34,660 LOC)
    • 55 *.md files (14,172 LOC)
    • 84 *.txt files (6,949 LOC)
    • 8 *.c files (1,244 LOC)
    • 1 *.asciidoc files (792 LOC)
    • 3 *.svg files (492 LOC)
    • 5 *.sh files (121 LOC)
    • 2 *.json files (101 LOC)
    • 4 *.yaml files (71 LOC)
    • 8 *.sql files (59 LOC)
    • 1 *.spec files (31 LOC)
    • 1 *.gp files (18 LOC)
    • 1 *.plist files (17 LOC)
    • 1 *.in files (13 LOC)
    • 1 *.properties files (9 LOC)
    • 1 *.mk files (8 LOC)
  • " *.po" is biggest, containing 58.99% of LOC.
  • " *.mk" is smallest, containing 0.01% of LOC.


*.po34660 LOC (58%) 75 files
*.md14172 LOC (24%) 55 files
*.txt6949 LOC (11%) 84 files
*.c1244 LOC (2%) 8 files
*.asciidoc792 LOC (1%) 1 file
*.svg492 LOC (<1%) 3 files
*.sh121 LOC (<1%) 5 files
*.json101 LOC (<1%) 2 files
*.yaml71 LOC (<1%) 4 files
*.sql59 LOC (<1%) 8 files
*.spec31 LOC (<1%) 1 file
*.gp18 LOC (<1%) 1 file
*.plist17 LOC (<1%) 1 file
*.in13 LOC (<1%) 1 file
*.properties9 LOC (<1%) 1 file
*.mk8 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 20:53