microsoft / MSIX-PackageSupportFramework
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
txt
vcxproj
filters
props
TXT
resx
xaml
csproj
xsd
targets
xsl
nuspec
ini
cmd
  • 22 extensions are included in analyses: h, cpp, txt, xml, vcxproj, filters, cs, md, ps1, json, props, TXT, resx, xaml, csproj, xsd, targets, xsl, nuspec, ini, gitignore, cmd
  • 6 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 ".*[.]resx" (The resx resource files) (3 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) (47 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.

main53200 LOC (73%) 173 files
test15928 LOC (21%) 96 files
generated104 LOC (<1%) 4 files
build and deployment235 LOC (<1%) 2 files
other3220 LOC (4%) 80 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
vcxproj
xaml
filters
txt
xsl
props
targets
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 173 files match defined criteria (53,200 lines of code, 100.0% vs. main code):
    • 87 *.h files (33,832 lines of code)
    • 46 *.cpp files (14,354 lines of code)
    • 11 *.cs files (2,676 lines of code)
    • 8 *.vcxproj files (798 lines of code)
    • 3 *.xaml files (375 lines of code)
    • 8 *.filters files (340 lines of code)
    • 3 *.txt files (325 lines of code)
    • 1 *.xsl files (244 lines of code)
    • 3 *.props files (151 lines of code)
    • 1 *.targets files (64 lines of code)
    • 1 *.ps1 files (22 lines of code)
    • 1 *.cmd files (19 lines of code)
  • " *.h" is biggest, containing 63.59% of code.
  • " *.cmd" is smallest, containing 0.04% of code.


*.h33832 LOC (63%) 87 files
*.cpp14354 LOC (26%) 46 files
*.cs2676 LOC (5%) 11 files
*.vcxproj798 LOC (1%) 8 files
*.xaml375 LOC (<1%) 3 files
*.filters340 LOC (<1%) 8 files
*.txt325 LOC (<1%) 3 files
*.xsl244 LOC (<1%) 1 files
*.props151 LOC (<1%) 3 files
*.targets64 LOC (<1%) 1 files
*.ps122 LOC (<1%) 1 files
*.cmd19 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
vcxproj
filters
props
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 96 files match defined criteria (15,928 lines of code, 29.9% vs. main code):
    • 39 *.cpp files (8,587 lines of code)
    • 15 *.h files (5,123 lines of code)
    • 14 *.vcxproj files (1,103 lines of code)
    • 13 *.ps1 files (621 lines of code)
    • 13 *.filters files (478 lines of code)
    • 2 *.props files (16 lines of code)
  • " *.cpp" is biggest, containing 53.91% of code.
  • " *.props" is smallest, containing 0.1% of code.


*.cpp8587 LOC (53%) 39 files
*.h5123 LOC (32%) 15 files
*.vcxproj1103 LOC (6%) 14 files
*.ps1621 LOC (3%) 13 files
*.filters478 LOC (3%) 13 files
*.props16 LOC (<1%) 2 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, 0.2% 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 ".*/[.]gitignore".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*[.]csproj".
  • 2 files match defined criteria (235 lines of code, 0.4% vs. main code):
    • 1 *.csproj files (192 lines of code)
    • 1 *.nuspec files (43 lines of code)
  • " *.csproj" is biggest, containing 81.7% of code.
  • " *.nuspec" is smallest, containing 18.3% of code.


*.csproj192 LOC (81%) 1 files
*.nuspec43 LOC (18%) 1 files
Other Code
vcxproj
csproj
filters
xsd
ini
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 ".*[.]ini".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 80 files match defined criteria (3,220 lines of code, 6.1% vs. main code):
    • 25 *.xml files (921 lines of code)
    • 19 *.md files (824 lines of code)
    • 11 *.json files (453 lines of code)
    • 8 *.cs files (297 lines of code)
    • 2 *.vcxproj files (281 lines of code)
    • 2 *.csproj files (274 lines of code)
    • 5 *.ps1 files (46 lines of code)
    • 2 *.filters files (42 lines of code)
    • 2 *.cpp files (37 lines of code)
    • 2 *.h files (23 lines of code)
    • 1 *.xsd files (16 lines of code)
    • 1 *.ini files (6 lines of code)
  • " *.xml" is biggest, containing 28.6% of code.
  • " *.ini" is smallest, containing 0.19% of code.


*.xml921 LOC (28%) 25 files
*.md824 LOC (25%) 19 files
*.json453 LOC (14%) 11 files
*.cs297 LOC (9%) 8 files
*.vcxproj281 LOC (8%) 2 files
*.csproj274 LOC (8%) 2 files
*.ps146 LOC (1%) 5 files
*.filters42 LOC (1%) 2 files
*.cpp37 LOC (1%) 2 files
*.h23 LOC (<1%) 2 files
*.xsd16 LOC (<1%) 1 files
*.ini6 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
  • *.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
  • *.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)
  • *.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
  • *.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
  • *.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
  • *.txt 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
  • *.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
  • *.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
  • *.targets 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
  • *.cmd 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 20:09