apache / nuttx-apps
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
bas
patch
mk
in
nims
nim
zig
cfg
nimble
l
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.

main232508 LOC (69%) 1,287 files
test6756 LOC (2%) 65 files
generated0 LOC (0%) 0 files
build and deployment1093 LOC (<1%) 16 files
other96197 LOC (28%) 858 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
l
nims
nimble
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1287 files match defined criteria (232,508 LOC, 100.0% vs. main code):
    • 716 *.c files (170,533 LOC)
    • 153 *.cxx files (32,306 LOC)
    • 292 *.h files (17,909 LOC)
    • 113 *.hxx files (8,194 LOC)
    • 1 *.l files (1,900 LOC)
    • 3 *.py files (1,242 LOC)
    • 2 *.hpp files (141 LOC)
    • 1 *.nims files (115 LOC)
    • 1 *.cmake files (90 LOC)
    • 1 *.nimble files (51 LOC)
    • 4 *.in files (27 LOC)
  • " *.c" is biggest, containing 73.35% of LOC.
  • " *.in" is smallest, containing 0.01% of LOC.


*.c170533 LOC (73%) 716 files
*.cxx32306 LOC (13%) 153 files
*.h17909 LOC (7%) 292 files
*.hxx8194 LOC (3%) 113 files
*.l1900 LOC (<1%) 1 file
*.py1242 LOC (<1%) 3 files
*.hpp141 LOC (<1%) 2 files
*.nims115 LOC (<1%) 1 file
*.cmake90 LOC (<1%) 1 file
*.nimble51 LOC (<1%) 1 file
*.in27 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 ".*/[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 ".*/UnitTests?/.*".
  • 65 files match defined criteria (6,756 LOC, 2.9% vs. main code):
    • 36 *.cxx files (3,862 LOC)
    • 9 *.c files (2,026 LOC)
    • 18 *.hxx files (749 LOC)
    • 1 *.py files (90 LOC)
    • 1 *.h files (29 LOC)
  • " *.cxx" is biggest, containing 57.16% of LOC.
  • " *.h" is smallest, containing 0.43% of LOC.


*.cxx3862 LOC (57%) 36 files
*.c2026 LOC (29%) 9 files
*.hxx749 LOC (11%) 18 files
*.py90 LOC (1%) 1 file
*.h29 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".
  • 16 files match defined criteria (1,093 LOC, 0.5% vs. main code):
    • 11 *.sh files (585 LOC)
    • 4 *.mk files (417 LOC)
    • 1 *.bat files (91 LOC)
  • " *.sh" is biggest, containing 53.52% of LOC.
  • " *.bat" is smallest, containing 8.33% of LOC.


*.sh585 LOC (53%) 11 files
*.mk417 LOC (38%) 4 files
*.bat91 LOC (8%) 1 file
Other Code
txt
patch
bas
zig
nim
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
  • 858 files match defined criteria (96,197 LOC, 41.4% vs. main code):
    • 333 *.c files (65,991 LOC)
    • 278 *.txt files (10,268 LOC)
    • 71 *.md files (8,727 LOC)
    • 27 *.patch files (6,409 LOC)
    • 70 *.h files (3,097 LOC)
    • 13 *.cxx files (874 LOC)
    • 52 *.bas files (473 LOC)
    • 2 *.css files (140 LOC)
    • 4 *.html files (55 LOC)
    • 2 *.sh files (46 LOC)
    • 1 *.rs files (42 LOC)
    • 1 *.zig files (36 LOC)
    • 1 *.nim files (15 LOC)
    • 1 *.py files (12 LOC)
    • 2 *.php files (12 LOC)
  • " *.c" is biggest, containing 68.6% of LOC.
  • " *.php" is smallest, containing 0.01% of LOC.


*.c65991 LOC (68%) 333 files
*.txt10268 LOC (10%) 278 files
*.md8727 LOC (9%) 71 files
*.patch6409 LOC (6%) 27 files
*.h3097 LOC (3%) 70 files
*.cxx874 LOC (<1%) 13 files
*.bas473 LOC (<1%) 52 files
*.css140 LOC (<1%) 2 files
*.html55 LOC (<1%) 4 files
*.sh46 LOC (<1%) 2 files
*.rs42 LOC (<1%) 1 file
*.zig36 LOC (<1%) 1 file
*.nim15 LOC (<1%) 1 file
*.py12 LOC (<1%) 1 file
*.php12 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2023-08-10 22:28