apache / nuttx
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
ld
s
patch
cfg
mk
in
lsl
ini
diff
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.

main2857887 LOC (93%) 17,200 files
test1970 LOC (<1%) 15 files
generated0 LOC (0%) 0 files
build and deployment14919 LOC (<1%) 131 files
other185219 LOC (6%) 2,146 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
ld
lsl
cfg
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 17200 files match defined criteria (2,857,887 LOC, 100.0% vs. main code):
    • 9,417 *.c files (1,842,665 LOC)
    • 7,025 *.h files (917,062 LOC)
    • 539 *.ld files (69,247 LOC)
    • 65 *.py files (11,467 LOC)
    • 63 *.cmake files (6,568 LOC)
    • 2 *.lsl files (4,184 LOC)
    • 29 *.asm files (3,587 LOC)
    • 39 *.cfg files (1,032 LOC)
    • 3 *.ps1 files (852 LOC)
    • 3 *.inc files (474 LOC)
    • 3 *.in files (333 LOC)
    • 8 *.cxx files (240 LOC)
    • 2 *.toml files (66 LOC)
    • 1 *.pl files (65 LOC)
    • 1 *.bash files (45 LOC)
  • " *.c" is biggest, containing 64.48% of LOC.
  • " *.bash" is smallest, containing 0% of LOC.


*.c1842665 LOC (64%) 9,417 files
*.h917062 LOC (32%) 7,025 files
*.ld69247 LOC (2%) 539 files
*.py11467 LOC (<1%) 65 files
*.cmake6568 LOC (<1%) 63 files
*.lsl4184 LOC (<1%) 2 files
*.asm3587 LOC (<1%) 29 files
*.cfg1032 LOC (<1%) 39 files
*.ps1852 LOC (<1%) 3 files
*.inc474 LOC (<1%) 3 files
*.in333 LOC (<1%) 3 files
*.cxx240 LOC (<1%) 8 files
*.toml66 LOC (<1%) 2 files
*.pl65 LOC (<1%) 1 file
*.bash45 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 ".*/test_.*".
  • 15 files match defined criteria (1,970 LOC, 0.1% vs. main code):
    • 4 *.c files (1,473 LOC)
    • 10 *.py files (474 LOC)
    • 1 *.h files (23 LOC)
  • " *.c" is biggest, containing 74.77% of LOC.
  • " *.h" is smallest, containing 1.17% of LOC.


*.c1473 LOC (74%) 4 files
*.py474 LOC (24%) 10 files
*.h23 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]bat".
  • 131 files match defined criteria (14,919 LOC, 0.5% vs. main code):
    • 86 *.sh files (7,680 LOC)
    • 36 *.mk files (6,590 LOC)
    • 9 *.bat files (649 LOC)
  • " *.sh" is biggest, containing 51.48% of LOC.
  • " *.bat" is smallest, containing 4.35% of LOC.


*.sh7680 LOC (51%) 86 files
*.mk6590 LOC (44%) 36 files
*.bat649 LOC (4%) 9 files
Other Code
txt
patch
diff
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]diff".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Ee]xamples/.*".
  • 2146 files match defined criteria (185,219 LOC, 6.5% vs. main code):
    • 1,241 *.rst files (97,582 LOC)
    • 825 *.txt files (80,072 LOC)
    • 56 *.patch files (3,884 LOC)
    • 12 *.md files (2,820 LOC)
    • 2 *.svg files (526 LOC)
    • 3 *.py files (113 LOC)
    • 1 *.diff files (87 LOC)
    • 1 *.css files (50 LOC)
    • 1 *.bat files (27 LOC)
    • 2 *.ini files (24 LOC)
    • 1 *.html files (23 LOC)
    • 1 *.json files (11 LOC)
  • " *.rst" is biggest, containing 52.68% of LOC.
  • " *.json" is smallest, containing 0.01% of LOC.


*.rst97582 LOC (52%) 1,241 files
*.txt80072 LOC (43%) 825 files
*.patch3884 LOC (2%) 56 files
*.md2820 LOC (1%) 12 files
*.svg526 LOC (<1%) 2 files
*.py113 LOC (<1%) 3 files
*.diff87 LOC (<1%) 1 file
*.css50 LOC (<1%) 1 file
*.bat27 LOC (<1%) 1 file
*.ini24 LOC (<1%) 2 files
*.html23 LOC (<1%) 1 file
*.json11 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 20:10