freertos / Lab-Project-FreeRTOS-LoRaWAN
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
S
project
patch
TXT
mk
ino
cproject
proto
gitmodules
properties
  • 25 extensions are included in analyses: h, c, txt, ld, s, html, py, xml, md, inc, S, gitignore, bat, sh, css, project, patch, TXT, json, mk, ino, cproject, proto, gitmodules, properties
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (7 files).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (239 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*[.]txt" (Text files) (25 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
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.

main97986 LOC (24%) 237 files
test0 LOC (0%) 0 files
generated50 LOC (<1%) 1 files
build and deployment0 LOC (0%) 0 files
other294778 LOC (75%) 1724 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 237 files match defined criteria (97,986 lines of code, 100.0% vs. main code):
    • 175 *.h files (66,995 lines of code)
    • 62 *.c files (30,991 lines of code)
  • " *.h" is biggest, containing 68.37% of code.
  • " *.c" is smallest, containing 31.63% of code.


*.h66995 LOC (68%) 175 files
*.c30991 LOC (31%) 62 files
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 ".*[.](html|html|xhtml)" AND any line of content like "[ ]*[<]meta name[=]"generator" .*".
  • 1 file matches defined criteria (50 lines of code, 0.1% vs. main code). All matches are in *.html files.


*.html50 LOC (100%) 1 files
Other Code
s
ld
patch
proto
txt
mk
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 ".*[.]patch".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 1724 files match defined criteria (294,778 lines of code, 300.8% vs. main code):
    • 689 *.c files (154,078 lines of code)
    • 968 *.h files (131,097 lines of code)
    • 24 *.s files (6,837 lines of code)
    • 19 *.ld files (1,269 lines of code)
    • 6 *.xml files (407 lines of code)
    • 1 *.css files (389 lines of code)
    • 5 *.html files (255 lines of code)
    • 6 *.md files (234 lines of code)
    • 1 *.patch files (135 lines of code)
    • 1 *.proto files (54 lines of code)
    • 1 *.txt files (17 lines of code)
    • 1 *.bat files (2 lines of code)
    • 1 *.sh files (2 lines of code)
    • 1 *.mk files (2 lines of code)
  • " *.c" is biggest, containing 52.27% of code.
  • " *.mk" is smallest, containing 0% of code.


*.c154078 LOC (52%) 689 files
*.h131097 LOC (44%) 968 files
*.s6837 LOC (2%) 24 files
*.ld1269 LOC (<1%) 19 files
*.xml407 LOC (<1%) 6 files
*.css389 LOC (<1%) 1 files
*.html255 LOC (<1%) 5 files
*.md234 LOC (<1%) 6 files
*.patch135 LOC (<1%) 1 files
*.proto54 LOC (<1%) 1 files
*.txt17 LOC (<1%) 1 files
*.bat2 LOC (<1%) 1 files
*.sh2 LOC (<1%) 1 files
*.mk2 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.h files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.c files are analyzed with CStyleAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis


2022-02-01 03:53