microsoft / WindowsDevicePortalWrapper
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
xaml
csproj
txt
resx
gitattributes
nuspec
shproj
cmd
  • 13 extensions are included in analyses: cs, xaml, csproj, md, txt, xml, json, resx, gitignore, gitattributes, nuspec, shproj, cmd
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (2 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (2 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) (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.

main9382 LOC (58%) 103 files
test0 LOC (0%) 0 files
generated104 LOC (<1%) 4 files
build and deployment737 LOC (4%) 5 files
other5812 LOC (36%) 70 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
shproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 103 files match defined criteria (9,382 lines of code, 100.0% vs. main code):
    • 102 *.cs files (9,367 lines of code)
    • 1 *.shproj files (15 lines of code)
  • " *.cs" is biggest, containing 99.84% of code.
  • " *.shproj" is smallest, containing 0.16% of code.


*.cs9367 LOC (99%) 102 files
*.shproj15 LOC (<1%) 1 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 4 files match defined criteria (104 lines of code, 1.1% vs. main code). All matches are in *.cs files.


*.cs104 LOC (100%) 4 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 ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]nuspec".
  • 5 files match defined criteria (737 lines of code, 7.9% vs. main code):
    • 4 *.csproj files (709 lines of code)
    • 1 *.nuspec files (28 lines of code)
  • " *.csproj" is biggest, containing 96.2% of code.
  • " *.nuspec" is smallest, containing 3.8% of code.


*.csproj709 LOC (96%) 4 files
*.nuspec28 LOC (3%) 1 files
Other Code
xaml
csproj
cmd
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 ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 70 files match defined criteria (5,812 lines of code, 61.9% vs. main code):
    • 43 *.cs files (4,169 lines of code)
    • 12 *.xaml files (555 lines of code)
    • 5 *.md files (552 lines of code)
    • 4 *.csproj files (479 lines of code)
    • 2 *.json files (32 lines of code)
    • 3 *.xml files (17 lines of code)
    • 1 *.cmd files (8 lines of code)
  • " *.cs" is biggest, containing 71.73% of code.
  • " *.cmd" is smallest, containing 0.14% of code.


*.cs4169 LOC (71%) 43 files
*.xaml555 LOC (9%) 12 files
*.md552 LOC (9%) 5 files
*.csproj479 LOC (8%) 4 files
*.json32 LOC (<1%) 2 files
*.xml17 LOC (<1%) 3 files
*.cmd8 LOC (<1%) 1 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)
  • *.shproj 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


2022-01-30 13:38