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
txt
cfg
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.

main612888 LOC (96%) 4,166 files
test14464 LOC (2%) 204 files
generated0 LOC (0%) 0 files
build and deployment2020 LOC (<1%) 154 files
other3974 LOC (<1%) 46 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
cmd
in
gdb
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 4166 files match defined criteria (612,888 LOC, 100.0% vs. main code):
    • 1,485 *.c files (398,597 LOC)
    • 1,293 *.h files (138,093 LOC)
    • 943 *.yml files (27,176 LOC)
    • 251 *.ld files (25,440 LOC)
    • 59 *.s files (16,834 LOC)
    • 92 *.cmd files (1,840 LOC)
    • 2 *.in files (1,798 LOC)
    • 5 *.py files (985 LOC)
    • 12 *.gdb files (967 LOC)
    • 16 *.cfg files (678 LOC)
    • 1 *.cmake files (253 LOC)
    • 3 *.rs files (125 LOC)
    • 3 *.html files (75 LOC)
    • 1 *.toml files (27 LOC)
  • " *.c" is biggest, containing 65.04% of LOC.
  • " *.toml" is smallest, containing 0% of LOC.


*.c398597 LOC (65%) 1,485 files
*.h138093 LOC (22%) 1,293 files
*.yml27176 LOC (4%) 943 files
*.ld25440 LOC (4%) 251 files
*.s16834 LOC (2%) 59 files
*.cmd1840 LOC (<1%) 92 files
*.in1798 LOC (<1%) 2 files
*.py985 LOC (<1%) 5 files
*.gdb967 LOC (<1%) 12 files
*.cfg678 LOC (<1%) 16 files
*.cmake253 LOC (<1%) 1 file
*.rs125 LOC (<1%) 3 files
*.html75 LOC (<1%) 3 files
*.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 ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_tests[.].*".
  • 204 files match defined criteria (14,464 LOC, 2.4% vs. main code):
    • 132 *.c files (13,047 LOC)
    • 57 *.h files (1,129 LOC)
    • 12 *.yml files (182 LOC)
    • 1 *.mk files (49 LOC)
    • 1 *.cmake files (30 LOC)
    • 1 *.sh files (27 LOC)
  • " *.c" is biggest, containing 90.2% of LOC.
  • " *.sh" is smallest, containing 0.19% of LOC.


*.c13047 LOC (90%) 132 files
*.h1129 LOC (7%) 57 files
*.yml182 LOC (1%) 12 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
  • 154 files match defined criteria (2,020 LOC, 0.3% vs. main code):
    • 152 *.sh files (1,834 LOC)
    • 1 *.mk files (185 LOC)
    • 1 *.bat files (1 LOC)
  • " *.sh" is biggest, containing 90.79% of LOC.
  • " *.bat" is smallest, containing 0.05% of LOC.


*.sh1834 LOC (90%) 152 files
*.mk185 LOC (9%) 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 ".*/[.]gitignore".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Dd]emos?/.*".
  • 46 files match defined criteria (3,974 LOC, 0.6% vs. main code):
    • 16 *.txt files (2,110 LOC)
    • 26 *.md files (1,565 LOC)
    • 1 *.rst files (246 LOC)
    • 1 *.c files (30 LOC)
    • 2 *.yml files (23 LOC)
  • " *.txt" is biggest, containing 53.1% of LOC.
  • " *.yml" is smallest, containing 0.58% of LOC.


*.txt2110 LOC (53%) 16 files
*.md1565 LOC (39%) 26 files
*.rst246 LOC (6%) 1 file
*.c30 LOC (<1%) 1 file
*.yml23 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2023-08-10 16:06