apache / mynewt-core
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
ld
s
cmd
cfg
txt
gdb
prefs
mk
in
project
cproject
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.

main527795 LOC (96%) 3,307 files
test14429 LOC (2%) 194 files
generated0 LOC (0%) 0 files
build and deployment2114 LOC (<1%) 160 files
other4110 LOC (<1%) 45 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
ld
s
in
cfg
gdb
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 3307 files match defined criteria (527,795 LOC, 100.0% vs. main code):
    • 1,505 *.c files (368,496 LOC)
    • 1,503 *.h files (124,394 LOC)
    • 194 *.ld files (23,088 LOC)
    • 35 *.s files (6,096 LOC)
    • 2 *.in files (1,798 LOC)
    • 5 *.py files (985 LOC)
    • 18 *.cfg files (977 LOC)
    • 12 *.gdb files (967 LOC)
    • 24 *.cmd files (480 LOC)
    • 1 *.cmake files (253 LOC)
    • 3 *.rs files (125 LOC)
    • 3 *.html files (75 LOC)
    • 1 *.awk files (34 LOC)
    • 1 *.toml files (27 LOC)
  • " *.c" is biggest, containing 69.82% of LOC.
  • " *.toml" is smallest, containing 0.01% of LOC.


*.c368496 LOC (69%) 1,505 files
*.h124394 LOC (23%) 1,503 files
*.ld23088 LOC (4%) 194 files
*.s6096 LOC (1%) 35 files
*.in1798 LOC (<1%) 2 files
*.py985 LOC (<1%) 5 files
*.cfg977 LOC (<1%) 18 files
*.gdb967 LOC (<1%) 12 files
*.cmd480 LOC (<1%) 24 files
*.cmake253 LOC (<1%) 1 file
*.rs125 LOC (<1%) 3 files
*.html75 LOC (<1%) 3 files
*.awk34 LOC (<1%) 1 file
*.toml27 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
mk
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test[.].*".
  • 194 files match defined criteria (14,429 LOC, 2.7% vs. main code):
    • 134 *.c files (13,164 LOC)
    • 57 *.h files (1,159 LOC)
    • 1 *.mk files (49 LOC)
    • 1 *.cmake files (30 LOC)
    • 1 *.sh files (27 LOC)
  • " *.c" is biggest, containing 91.23% of LOC.
  • " *.sh" is smallest, containing 0.19% of LOC.


*.c13164 LOC (91%) 134 files
*.h1159 LOC (8%) 57 files
*.mk49 LOC (<1%) 1 file
*.cmake30 LOC (<1%) 1 file
*.sh27 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]bat".
  • 160 files match defined criteria (2,114 LOC, 0.4% vs. main code):
    • 158 *.sh files (1,928 LOC)
    • 1 *.mk files (185 LOC)
    • 1 *.bat files (1 LOC)
  • " *.sh" is biggest, containing 91.2% of LOC.
  • " *.bat" is smallest, containing 0.05% of LOC.


*.sh1928 LOC (91%) 158 files
*.mk185 LOC (8%) 1 file
*.bat1 LOC (<1%) 1 file
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/vendor/.*".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 45 files match defined criteria (4,110 LOC, 0.8% vs. main code):
    • 16 *.txt files (2,110 LOC)
    • 28 *.md files (1,754 LOC)
    • 1 *.rst files (246 LOC)
  • " *.txt" is biggest, containing 51.34% of LOC.
  • " *.rst" is smallest, containing 5.99% of LOC.


*.txt2110 LOC (51%) 16 files
*.md1754 LOC (42%) 28 files
*.rst246 LOC (5%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-07 15:56