microsoft / ManagedEsent
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
csproj
xaml
txt
xsl
nuspec
lex
y
  • 16 extensions are included in analyses: cs, csproj, md, py, bat, xaml, txt, xml, cpp, pl, xsl, json, nuspec, lex, gitignore, y
  • 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) (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.

main111266 LOC (87%) 584 files
test1630 LOC (1%) 5 files
generated0 LOC (0%) 0 files
build and deployment1657 LOC (1%) 22 files
other12836 LOC (10%) 17 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xsl
y
xaml
lex
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 584 files match defined criteria (111,266 lines of code, 100.0% vs. main code):
    • 572 *.cs files (109,623 lines of code)
    • 3 *.py files (774 lines of code)
    • 2 *.pl files (315 lines of code)
    • 1 *.xsl files (175 lines of code)
    • 1 *.y files (152 lines of code)
    • 2 *.cpp files (142 lines of code)
    • 2 *.xaml files (44 lines of code)
    • 1 *.lex files (41 lines of code)
  • " *.cs" is biggest, containing 98.52% of code.
  • " *.lex" is smallest, containing 0.04% of code.


*.cs109623 LOC (98%) 572 files
*.py774 LOC (<1%) 3 files
*.pl315 LOC (<1%) 2 files
*.xsl175 LOC (<1%) 1 files
*.y152 LOC (<1%) 1 files
*.cpp142 LOC (<1%) 2 files
*.xaml44 LOC (<1%) 2 files
*.lex41 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 5 files match defined criteria (1,630 lines of code, 1.5% vs. main code):
    • 3 *.py files (1,569 lines of code)
    • 2 *.bat files (61 lines of code)
  • " *.py" is biggest, containing 96.26% of code.
  • " *.bat" is smallest, containing 3.74% of code.


*.py1569 LOC (96%) 3 files
*.bat61 LOC (3%) 2 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
nuspec
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 ".*[.]csproj".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]nuspec".
  • 22 files match defined criteria (1,657 lines of code, 1.5% vs. main code):
    • 17 *.csproj files (1,349 lines of code)
    • 4 *.bat files (290 lines of code)
    • 1 *.nuspec files (18 lines of code)
  • " *.csproj" is biggest, containing 81.41% of code.
  • " *.nuspec" is smallest, containing 1.09% of code.


*.csproj1349 LOC (81%) 17 files
*.bat290 LOC (17%) 4 files
*.nuspec18 LOC (1%) 1 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]+".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 17 files match defined criteria (12,836 lines of code, 11.5% vs. main code):
    • 4 *.xml files (11,382 lines of code)
    • 13 *.md files (1,454 lines of code)
  • " *.xml" is biggest, containing 88.67% of code.
  • " *.md" is smallest, containing 11.33% of code.


*.xml11382 LOC (88%) 4 files
*.md1454 LOC (11%) 13 files
Analyzers
Info about analyzers used for source code examinations.
  • *.cs files are analyzed with CSharpAnalyzer:
    • 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 (based on namespace heuristics)
  • *.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
  • *.pl files are analyzed with PerlAnalyzer:
    • 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
  • *.xsl 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
  • *.y 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
  • *.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
  • *.xaml 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
  • *.lex 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 15:09