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

main32896 LOC (48%) 873 files
test0 LOC (0%) 0 files
generated2970 LOC (4%) 32 files
build and deployment1306 LOC (1%) 46 files
other30424 LOC (45%) 688 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xaml
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 873 files match defined criteria (32,896 lines of code, 100.0% vs. main code):
    • 735 *.cs files (25,320 lines of code)
    • 138 *.xaml files (7,576 lines of code)
  • " *.cs" is biggest, containing 76.97% of code.
  • " *.xaml" is smallest, containing 23.03% of code.


*.cs25320 LOC (76%) 735 files
*.xaml7576 LOC (23%) 138 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 "[/][/][ ]*".
  • 32 files match defined criteria (2,970 lines of code, 9.0% vs. main code). All matches are in *.cs files.


*.cs2970 LOC (100%) 32 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
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".
  • 46 files match defined criteria (1,306 lines of code, 4.0% vs. main code). All matches are in *.csproj files.


*.csproj1306 LOC (100%) 46 files
Other Code
xaml
csproj
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 ".*/[Ss]amples/.*".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 688 files match defined criteria (30,424 lines of code, 92.5% vs. main code):
    • 557 *.cs files (22,213 lines of code)
    • 78 *.xaml files (4,502 lines of code)
    • 29 *.csproj files (2,121 lines of code)
    • 12 *.md files (1,352 lines of code)
    • 10 *.vb files (202 lines of code)
    • 2 *.xml files (34 lines of code)
  • " *.cs" is biggest, containing 73.01% of code.
  • " *.xml" is smallest, containing 0.11% of code.


*.cs22213 LOC (73%) 557 files
*.xaml4502 LOC (14%) 78 files
*.csproj2121 LOC (6%) 29 files
*.md1352 LOC (4%) 12 files
*.vb202 LOC (<1%) 10 files
*.xml34 LOC (<1%) 2 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)
  • *.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


2022-01-31 01:06