microsoft / DMF
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
vcxproj
Filters
filters
txt
man
cmd
  • 16 extensions are included in analyses: h, c, md, vcxproj, html, Filters, filters, cpp, txt, man, yml, gitignore, ps1, json, cmd, yaml
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (1 file).
    • 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) (3 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.

main101763 LOC (41%) 345 files
test12558 LOC (5%) 42 files
generated0 LOC (0%) 0 files
build and deployment0 LOC (0%) 0 files
other129641 LOC (53%) 113 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
vcxproj
filters
man
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 345 files match defined criteria (101,763 lines of code, 100.0% vs. main code):
    • 136 *.c files (75,574 lines of code)
    • 136 *.h files (11,871 lines of code)
    • 30 *.vcxproj files (6,799 lines of code)
    • 5 *.cpp files (3,279 lines of code)
    • 28 *.filters files (2,540 lines of code)
    • 4 *.man files (1,236 lines of code)
    • 1 *.ps1 files (299 lines of code)
    • 3 *.yml files (153 lines of code)
    • 1 *.yaml files (9 lines of code)
    • 1 *.cmd files (3 lines of code)
  • " *.c" is biggest, containing 74.26% of code.
  • " *.cmd" is smallest, containing 0% of code.


*.c75574 LOC (74%) 136 files
*.h11871 LOC (11%) 136 files
*.vcxproj6799 LOC (6%) 30 files
*.cpp3279 LOC (3%) 5 files
*.filters2540 LOC (2%) 28 files
*.man1236 LOC (1%) 4 files
*.ps1299 LOC (<1%) 1 files
*.yml153 LOC (<1%) 3 files
*.yaml9 LOC (<1%) 1 files
*.cmd3 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
vcxproj
filters
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 42 files match defined criteria (12,558 lines of code, 12.3% vs. main code):
    • 17 *.c files (11,637 lines of code)
    • 2 *.vcxproj files (549 lines of code)
    • 2 *.filters files (261 lines of code)
    • 21 *.h files (111 lines of code)
  • " *.c" is biggest, containing 92.67% of code.
  • " *.h" is smallest, containing 0.88% of code.


*.c11637 LOC (92%) 17 files
*.vcxproj549 LOC (4%) 2 files
*.filters261 LOC (2%) 2 files
*.h111 LOC (<1%) 21 files
Other Code
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 ".*/[Dd]ocumentation/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
  • 113 files match defined criteria (129,641 lines of code, 127.4% vs. main code):
    • 20 *.html files (98,800 lines of code)
    • 93 *.md files (30,841 lines of code)
  • " *.html" is biggest, containing 76.21% of code.
  • " *.md" is smallest, containing 23.79% of code.


*.html98800 LOC (76%) 20 files
*.md30841 LOC (23%) 93 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
  • *.vcxproj files are analyzed with XmlAnalyzer:
    • 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
  • *.filters files are analyzed with XmlAnalyzer:
    • 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
  • *.man 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
  • *.ps1 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
  • *.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
  • *.yaml 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
  • *.cmd 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 21:57