microsoft / mu_plus
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
robot
txt
cmd
xsd
nasm
  • 19 extensions are included in analyses: c, h, md, py, robot, xml, yaml, bat, yml, rst, txt, inc, cmd, json, html, xsd, ps1, gitignore, nasm
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (15 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) (5 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.

main174836 LOC (92%) 555 files
test9559 LOC (5%) 74 files
generated0 LOC (0%) 0 files
build and deployment4 LOC (<1%) 2 files
other5599 LOC (2%) 130 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
nasm
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 555 files match defined criteria (174,836 lines of code, 100.0% vs. main code):
    • 251 *.h files (97,416 lines of code)
    • 280 *.c files (74,213 lines of code)
    • 2 *.html files (1,240 lines of code)
    • 9 *.py files (1,220 lines of code)
    • 11 *.yaml files (683 lines of code)
    • 1 *.nasm files (40 lines of code)
    • 1 *.inc files (24 lines of code)
  • " *.h" is biggest, containing 55.72% of code.
  • " *.inc" is smallest, containing 0.01% of code.


*.h97416 LOC (55%) 251 files
*.c74213 LOC (42%) 280 files
*.html1240 LOC (<1%) 2 files
*.py1220 LOC (<1%) 9 files
*.yaml683 LOC (<1%) 11 files
*.nasm40 LOC (<1%) 1 files
*.inc24 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/UnitTests?/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
    • files with paths like ".*UnitTests/.*".
  • 74 files match defined criteria (9,559 lines of code, 5.5% vs. main code):
    • 16 *.c files (5,092 lines of code)
    • 22 *.py files (2,809 lines of code)
    • 25 *.h files (1,358 lines of code)
    • 7 *.bat files (163 lines of code)
    • 1 *.ps1 files (90 lines of code)
    • 3 *.cmd files (47 lines of code)
  • " *.c" is biggest, containing 53.27% of code.
  • " *.cmd" is smallest, containing 0.49% of code.


*.c5092 LOC (53%) 16 files
*.py2809 LOC (29%) 22 files
*.h1358 LOC (14%) 25 files
*.bat163 LOC (1%) 7 files
*.ps190 LOC (<1%) 1 files
*.cmd47 LOC (<1%) 3 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]bat".
  • 2 files match defined criteria (4 lines of code, 0.0% vs. main code). All matches are in *.bat files.


*.bat4 LOC (100%) 2 files
Other Code
robot
xsd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 130 files match defined criteria (5,599 lines of code, 3.2% vs. main code):
    • 96 *.md files (2,872 lines of code)
    • 14 *.robot files (2,091 lines of code)
    • 12 *.xml files (411 lines of code)
    • 7 *.rst files (121 lines of code)
    • 1 *.xsd files (104 lines of code)
  • " *.md" is biggest, containing 51.29% of code.
  • " *.xsd" is smallest, containing 1.86% of code.


*.md2872 LOC (51%) 96 files
*.robot2091 LOC (37%) 14 files
*.xml411 LOC (7%) 12 files
*.rst121 LOC (2%) 7 files
*.xsd104 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
  • *.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
  • *.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
  • *.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
  • *.nasm 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
  • *.inc files are analyzed with PhpAnalyzer:
    • 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


2022-01-30 22:08