microsoft / psi
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
fs
txt
vcxproj
filters
gitattributes
nuspec
resx
props
liquid
fsproj
  • 21 extensions are included in analyses: cs, xaml, json, csproj, h, sh, cpp, md, fs, txt, vcxproj, gitignore, yml, filters, gitattributes, ps1, nuspec, resx, props, liquid, fsproj
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (5 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (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) (7 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.

main104884 LOC (94%) 1147 files
test0 LOC (0%) 0 files
generated291 LOC (<1%) 1 files
build and deployment3638 LOC (3%) 79 files
other1968 LOC (1%) 72 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xaml
fs
vcxproj
filters
fsproj
props
liquid
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1147 files match defined criteria (104,884 lines of code, 100.0% vs. main code):
    • 1,011 *.cs files (91,273 lines of code)
    • 70 *.xaml files (8,280 lines of code)
    • 18 *.cpp files (2,257 lines of code)
    • 14 *.fs files (1,440 lines of code)
    • 24 *.h files (894 lines of code)
    • 3 *.vcxproj files (445 lines of code)
    • 2 *.filters files (110 lines of code)
    • 1 *.ps1 files (96 lines of code)
    • 1 *.fsproj files (46 lines of code)
    • 1 *.props files (28 lines of code)
    • 1 *.liquid files (8 lines of code)
    • 1 *.yml files (7 lines of code)
  • " *.cs" is biggest, containing 87.02% of code.
  • " *.yml" is smallest, containing 0.01% of code.


*.cs91273 LOC (87%) 1011 files
*.xaml8280 LOC (7%) 70 files
*.cpp2257 LOC (2%) 18 files
*.fs1440 LOC (1%) 14 files
*.h894 LOC (<1%) 24 files
*.vcxproj445 LOC (<1%) 3 files
*.filters110 LOC (<1%) 2 files
*.ps196 LOC (<1%) 1 files
*.fsproj46 LOC (<1%) 1 files
*.props28 LOC (<1%) 1 files
*.liquid8 LOC (<1%) 1 files
*.yml7 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 "[/][/][ ]*".
  • 1 file matches defined criteria (291 lines of code, 0.3% vs. main code). All matches are in *.cs files.


*.cs291 LOC (100%) 1 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 ".*[.]sh".
    • files with paths like ".*[.]nuspec".
  • 79 files match defined criteria (3,638 lines of code, 3.5% vs. main code):
    • 56 *.csproj files (3,557 lines of code)
    • 22 *.sh files (46 lines of code)
    • 1 *.nuspec files (35 lines of code)
  • " *.csproj" is biggest, containing 97.77% of code.
  • " *.nuspec" is smallest, containing 0.96% of code.


*.csproj3557 LOC (97%) 56 files
*.sh46 LOC (1%) 22 files
*.nuspec35 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 ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
  • 72 files match defined criteria (1,968 lines of code, 1.9% vs. main code):
    • 57 *.json files (1,039 lines of code)
    • 15 *.md files (929 lines of code)
  • " *.json" is biggest, containing 52.79% of code.
  • " *.md" is smallest, containing 47.21% of code.


*.json1039 LOC (52%) 57 files
*.md929 LOC (47%) 15 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
  • *.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
  • *.fs 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
  • *.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
  • *.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
  • *.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
  • *.fsproj 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
  • *.props 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
  • *.liquid 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


2022-01-30 13:55