microsoft / uf2-samdx1
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
mk
txt
S
ini
xsd
clang-format
gitmodules
gitattributes
tcl
gdbinit
  • 25 extensions are included in analyses: html, js, h, c, ld, s, mk, css, txt, S, ini, cpp, json, bat, md, xsd, py, clang-format, gitmodules, gitattributes, sh, yml, tcl, gitignore, gdbinit
  • 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 ".*/[Vv]endors?/.*" (Dependencies) (6 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 ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (26 files).
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.

main353991 LOC (78%) 1230 files
test1185 LOC (<1%) 5 files
generated0 LOC (0%) 0 files
build and deployment226 LOC (<1%) 49 files
other95042 LOC (21%) 1153 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
tcl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1230 files match defined criteria (353,991 lines of code, 100.0% vs. main code):
    • 606 *.h files (203,576 lines of code)
    • 389 *.c files (116,579 lines of code)
    • 93 *.ld files (12,356 lines of code)
    • 55 *.html files (10,647 lines of code)
    • 38 *.s files (8,127 lines of code)
    • 33 *.js files (1,242 lines of code)
    • 3 *.css files (1,186 lines of code)
    • 11 *.cpp files (183 lines of code)
    • 1 *.py files (48 lines of code)
    • 1 *.tcl files (47 lines of code)
  • " *.h" is biggest, containing 57.51% of code.
  • " *.tcl" is smallest, containing 0.01% of code.


*.h203576 LOC (57%) 606 files
*.c116579 LOC (32%) 389 files
*.ld12356 LOC (3%) 93 files
*.html10647 LOC (3%) 55 files
*.s8127 LOC (2%) 38 files
*.js1242 LOC (<1%) 33 files
*.css1186 LOC (<1%) 3 files
*.cpp183 LOC (<1%) 11 files
*.py48 LOC (<1%) 1 files
*.tcl47 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
s
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 5 files match defined criteria (1,185 lines of code, 0.3% vs. main code):
    • 4 *.c files (911 lines of code)
    • 1 *.s files (274 lines of code)
  • " *.c" is biggest, containing 76.88% of code.
  • " *.s" is smallest, containing 23.12% of code.


*.c911 LOC (76%) 4 files
*.s274 LOC (23%) 1 files
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 ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
  • 49 files match defined criteria (226 lines of code, 0.1% vs. main code):
    • 4 *.bat files (136 lines of code)
    • 44 *.mk files (88 lines of code)
    • 1 *.sh files (2 lines of code)
  • " *.bat" is biggest, containing 60.18% of code.
  • " *.sh" is smallest, containing 0.88% of code.


*.bat136 LOC (60%) 4 files
*.mk88 LOC (38%) 44 files
*.sh2 LOC (<1%) 1 files
Other Code
s
xsd
ld
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]ini".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 1153 files match defined criteria (95,042 lines of code, 26.8% vs. main code):
    • 84 *.c files (28,055 lines of code)
    • 355 *.html files (20,597 lines of code)
    • 582 *.js files (17,679 lines of code)
    • 56 *.s files (13,472 lines of code)
    • 30 *.css files (12,397 lines of code)
    • 3 *.xsd files (1,636 lines of code)
    • 4 *.ld files (676 lines of code)
    • 3 *.md files (203 lines of code)
    • 18 *.h files (159 lines of code)
    • 17 *.ini files (157 lines of code)
    • 1 *.json files (11 lines of code)
  • " *.c" is biggest, containing 29.52% of code.
  • " *.json" is smallest, containing 0.01% of code.


*.c28055 LOC (29%) 84 files
*.html20597 LOC (21%) 355 files
*.js17679 LOC (18%) 582 files
*.s13472 LOC (14%) 56 files
*.css12397 LOC (13%) 30 files
*.xsd1636 LOC (1%) 3 files
*.ld676 LOC (<1%) 4 files
*.md203 LOC (<1%) 3 files
*.h159 LOC (<1%) 18 files
*.ini157 LOC (<1%) 17 files
*.json11 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
  • *.ld 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
  • *.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
  • *.s 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
  • *.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
  • *.css files are analyzed with CssAnalyzer:
    • 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
  • *.cpp 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
  • *.tcl 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-01-30 14:09