freertos / FreeRTOS
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
S
s
ld
project
cproject
prefs
ini
filters
xsl
vcxproj
mk
lds
i
cmd
launch
cfg
in
cmake
properties
make
prc
mss
ccxml
patch
gdb
tcl
m4
tps
x
opa
sig
spec
cxx
gitattributes
editorconfig
clang-format
gitmodules
lsl
  • 64 extensions are included in analyses: h, c, txt, S, s, ld, md, json, project, bat, cproject, xml, prefs, ini, filters, xsl, vcxproj, mk, lds, py, i, cmd, launch, asm, H, gitignore, C, html, cfg, in, yml, cmake, properties, make, inc, prc, mss, sh, bash, ccxml, patch, ps1, htm, gdb, js, tcl, css, svg, ftl, m4, tps, ASM, x, opa, sig, spec, cpp, cxx, gitattributes, editorconfig, clang-format, gitmodules, lsl, pl
  • 10 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (363 files).
    • exclude files with path like ".*[.]m4" (stuff autogenerated by autoconf - still C deps) (2 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (275 files).
    • exclude files with path like ".*/target/.*" (Compiled files) (82 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (2 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) (170 files).
    • exclude files with path like ".*/ThirdParty/.*" (3rd library libraries) (0 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.

main23724 LOC (<1%) 122 files
test45044 LOC (1%) 292 files
generated259 LOC (<1%) 2 files
build and deployment0 LOC (0%) 0 files
other3112282 LOC (97%) 9741 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cfg
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 122 files match defined criteria (23,724 lines of code, 100.0% vs. main code):
    • 52 *.c files (16,876 lines of code)
    • 59 *.h files (5,758 lines of code)
    • 5 *.py files (366 lines of code)
    • 2 *.js files (279 lines of code)
    • 1 *.cfg files (158 lines of code)
    • 1 *.yml files (131 lines of code)
    • 1 *.html files (92 lines of code)
    • 1 *.cmake files (64 lines of code)
  • " *.c" is biggest, containing 71.13% of code.
  • " *.cmake" is smallest, containing 0.27% of code.


*.c16876 LOC (71%) 52 files
*.h5758 LOC (24%) 59 files
*.py366 LOC (1%) 5 files
*.js279 LOC (1%) 2 files
*.cfg158 LOC (<1%) 1 files
*.yml131 LOC (<1%) 1 files
*.html92 LOC (<1%) 1 files
*.cmake64 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
filters
vcxproj
cmake
mk
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 292 files match defined criteria (45,044 lines of code, 189.9% vs. main code):
    • 131 *.c files (21,885 lines of code)
    • 3 *.filters files (9,917 lines of code)
    • 122 *.h files (7,227 lines of code)
    • 3 *.vcxproj files (3,713 lines of code)
    • 18 *.py files (1,580 lines of code)
    • 4 *.cmake files (200 lines of code)
    • 2 *.mk files (200 lines of code)
    • 6 *.yml files (194 lines of code)
    • 2 *.sh files (65 lines of code)
    • 1 *.in files (63 lines of code)
  • " *.c" is biggest, containing 48.59% of code.
  • " *.in" is smallest, containing 0.14% of code.


*.c21885 LOC (48%) 131 files
*.filters9917 LOC (22%) 3 files
*.h7227 LOC (16%) 122 files
*.vcxproj3713 LOC (8%) 3 files
*.py1580 LOC (3%) 18 files
*.cmake200 LOC (<1%) 4 files
*.mk200 LOC (<1%) 2 files
*.yml194 LOC (<1%) 6 files
*.sh65 LOC (<1%) 2 files
*.in63 LOC (<1%) 1 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" .*".
  • 2 files match defined criteria (259 lines of code, 1.1% vs. main code). All matches are in *.html files.


*.html259 LOC (100%) 2 files
Other Code
s
tcl
filters
ld
lds
vcxproj
in
mk
launch
mss
ini
cfg
cmd
make
prc
x
patch
tps
properties
ccxml
sig
opa
gdb
lsl
spec
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]patch".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 9741 files match defined criteria (3,112,282 lines of code, 13118.7% vs. main code):
    • 5,192 *.h files (2,047,161 lines of code)
    • 3,560 *.c files (861,651 lines of code)
    • 261 *.s files (61,383 lines of code)
    • 4 *.tcl files (28,394 lines of code)
    • 37 *.filters files (20,981 lines of code)
    • 34 *.xml files (19,197 lines of code)
    • 103 *.ld files (15,386 lines of code)
    • 28 *.asm files (13,323 lines of code)
    • 33 *.lds files (7,637 lines of code)
    • 84 *.json files (5,673 lines of code)
    • 18 *.vcxproj files (5,283 lines of code)
    • 7 *.in files (3,527 lines of code)
    • 3 *.svg files (3,304 lines of code)
    • 86 *.md files (2,588 lines of code)
    • 29 *.mk files (2,092 lines of code)
    • 26 *.launch files (2,004 lines of code)
    • 4 *.htm files (1,791 lines of code)
    • 7 *.mss files (1,674 lines of code)
    • 61 *.bat files (1,417 lines of code)
    • 3 *.css files (1,176 lines of code)
    • 43 *.ini files (1,060 lines of code)
    • 11 *.cfg files (940 lines of code)
    • 29 *.cmd files (759 lines of code)
    • 7 *.make files (655 lines of code)
    • 4 *.py files (624 lines of code)
    • 7 *.prc files (580 lines of code)
    • 5 *.html files (363 lines of code)
    • 7 *.inc files (348 lines of code)
    • 2 *.x files (305 lines of code)
    • 6 *.bash files (300 lines of code)
    • 4 *.patch files (117 lines of code)
    • 4 *.ps1 files (112 lines of code)
    • 3 *.tps files (107 lines of code)
    • 2 *.js files (106 lines of code)
    • 12 *.properties files (83 lines of code)
    • 5 *.ccxml files (67 lines of code)
    • 2 *.sig files (38 lines of code)
    • 2 *.opa files (29 lines of code)
    • 1 *.gdb files (21 lines of code)
    • 1 *.lsl files (20 lines of code)
    • 2 *.spec files (4 lines of code)
    • 2 *.cpp files (2 lines of code)
  • " *.h" is biggest, containing 65.78% of code.
  • " *.cpp" is smallest, containing 0% of code.


*.h2047161 LOC (65%) 5192 files
*.c861651 LOC (27%) 3560 files
*.s61383 LOC (1%) 261 files
*.tcl28394 LOC (<1%) 4 files
*.filters20981 LOC (<1%) 37 files
*.xml19197 LOC (<1%) 34 files
*.ld15386 LOC (<1%) 103 files
*.asm13323 LOC (<1%) 28 files
*.lds7637 LOC (<1%) 33 files
*.json5673 LOC (<1%) 84 files
*.vcxproj5283 LOC (<1%) 18 files
*.in3527 LOC (<1%) 7 files
*.svg3304 LOC (<1%) 3 files
*.md2588 LOC (<1%) 86 files
*.mk2092 LOC (<1%) 29 files
*.launch2004 LOC (<1%) 26 files
*.htm1791 LOC (<1%) 4 files
*.mss1674 LOC (<1%) 7 files
*.bat1417 LOC (<1%) 61 files
*.css1176 LOC (<1%) 3 files
*.ini1060 LOC (<1%) 43 files
*.cfg940 LOC (<1%) 11 files
*.cmd759 LOC (<1%) 29 files
*.make655 LOC (<1%) 7 files
*.py624 LOC (<1%) 4 files
*.prc580 LOC (<1%) 7 files
*.html363 LOC (<1%) 5 files
*.inc348 LOC (<1%) 7 files
*.x305 LOC (<1%) 2 files
*.bash300 LOC (<1%) 6 files
*.patch117 LOC (<1%) 4 files
*.ps1112 LOC (<1%) 4 files
*.tps107 LOC (<1%) 3 files
*.js106 LOC (<1%) 2 files
*.properties83 LOC (<1%) 12 files
*.ccxml67 LOC (<1%) 5 files
*.sig38 LOC (<1%) 2 files
*.opa29 LOC (<1%) 2 files
*.gdb21 LOC (<1%) 1 files
*.lsl20 LOC (<1%) 1 files
*.spec4 LOC (<1%) 2 files
*.cpp2 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.py files are analyzed with PythonAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.js files are analyzed with JavaScriptAnalyzer:
    • 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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.yml files are analyzed with YamlAnalyzer:
    • 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)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.html files are analyzed with HtmlAnalyzer:
    • 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
  • *.cmake files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2022-02-01 03:47