aws / ota-for-aws-iot-embedded-sdk
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
cmake
cfg
gitmodules
  • 13 extensions are included in analyses: c, md, txt, json, h, yml, cmake, gitignore, css, cfg, py, xml, gitmodules
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (9 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (3 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) (122 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.

main5676 LOC (37%) 28 files
test6761 LOC (44%) 132 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other2635 LOC (17%) 243 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmake
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 28 files match defined criteria (5,676 lines of code, 100.0% vs. main code):
    • 8 *.c files (4,406 lines of code)
    • 15 *.h files (910 lines of code)
    • 2 *.cmake files (161 lines of code)
    • 1 *.cfg files (158 lines of code)
    • 2 *.yml files (41 lines of code)
  • " *.c" is biggest, containing 77.63% of code.
  • " *.yml" is smallest, containing 0.72% of code.


*.c4406 LOC (77%) 8 files
*.h910 LOC (16%) 15 files
*.cmake161 LOC (2%) 2 files
*.cfg158 LOC (2%) 1 files
*.yml41 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 132 files match defined criteria (6,761 lines of code, 119.1% vs. main code):
    • 125 *.c files (6,332 lines of code)
    • 2 *.cmake files (207 lines of code)
    • 4 *.h files (193 lines of code)
    • 1 *.py files (29 lines of code)
  • " *.c" is biggest, containing 93.65% of code.
  • " *.py" is smallest, containing 0.43% of code.


*.c6332 LOC (93%) 125 files
*.cmake207 LOC (3%) 2 files
*.h193 LOC (2%) 4 files
*.py29 LOC (<1%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 243 files match defined criteria (2,635 lines of code, 46.4% vs. main code):
    • 124 *.md files (1,921 lines of code)
    • 119 *.json files (714 lines of code)
  • " *.md" is biggest, containing 72.9% of code.
  • " *.json" is smallest, containing 27.1% of code.


*.md1921 LOC (72%) 124 files
*.json714 LOC (27%) 119 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
  • *.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
  • *.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


2022-01-31 15:18