microsoft / WindowsProtocolTestSuites
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
wxs
cshtml
cmd
xaml
wxl
wixproj
txt
resx
vcxproj
asset
reg
profile
xsd
gitattributes
ini
filters
properties
  • 42 extensions are included in analyses: cs, xml, ps1, csproj, wxs, ts, html, cshtml, md, cmd, sh, tsx, xaml, js, css, java, json, wxl, wixproj, txt, yml, cpp, h, bat, resx, c, vcxproj, gitignore, asset, PS1, reg, gradle, py, psm1, profile, xsd, gitattributes, ini, svg, filters, XML, properties
  • 14 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (7 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (6 files).
    • exclude files with path like ".*\.d\.ts" (Typescript definition files) (1 file).
    • exclude files with path like ".*/docs/.*" (Documentation) (24 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (2 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (2 files).
    • exclude files with path like ".*/knockout-(\d+\.){3}(debug\.)?js" (Knockout) (1 file).
    • exclude files with path like ".*/modernizr\-\d\.\d+(\.\d+)?\.js" (Modernizr) (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) (8 files).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (1 file).
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.

main1007115 LOC (82%) 4196 files
test730 LOC (<1%) 8 files
generated122105 LOC (10%) 51 files
build and deployment7762 LOC (<1%) 195 files
other83009 LOC (6%) 2309 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
wxs
wixproj
cshtml
xaml
cmd
asset
vcxproj
wxl
reg
filters
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 4196 files match defined criteria (1,007,115 lines of code, 100.0% vs. main code):
    • 3,243 *.cs files (913,791 lines of code)
    • 486 *.ps1 files (33,388 lines of code)
    • 5 *.c files (14,192 lines of code)
    • 62 *.html files (11,996 lines of code)
    • 95 *.wxs files (7,564 lines of code)
    • 8 *.js files (5,033 lines of code)
    • 32 *.tsx files (4,183 lines of code)
    • 62 *.ts files (3,645 lines of code)
    • 11 *.wixproj files (2,584 lines of code)
    • 57 *.cshtml files (2,300 lines of code)
    • 9 *.cpp files (1,331 lines of code)
    • 22 *.xaml files (1,291 lines of code)
    • 9 *.css files (1,129 lines of code)
    • 8 *.h files (963 lines of code)
    • 42 *.cmd files (825 lines of code)
    • 3 *.asset files (540 lines of code)
    • 12 *.java files (522 lines of code)
    • 3 *.vcxproj files (457 lines of code)
    • 10 *.yml files (425 lines of code)
    • 1 *.psm1 files (376 lines of code)
    • 1 *.py files (257 lines of code)
    • 11 *.wxl files (129 lines of code)
    • 1 *.xml files (74 lines of code)
    • 2 *.reg files (67 lines of code)
    • 1 *.filters files (53 lines of code)
  • " *.cs" is biggest, containing 90.73% of code.
  • " *.filters" is smallest, containing 0.01% of code.


*.cs913791 LOC (90%) 3243 files
*.ps133388 LOC (3%) 486 files
*.c14192 LOC (1%) 5 files
*.html11996 LOC (1%) 62 files
*.wxs7564 LOC (<1%) 95 files
*.js5033 LOC (<1%) 8 files
*.tsx4183 LOC (<1%) 32 files
*.ts3645 LOC (<1%) 62 files
*.wixproj2584 LOC (<1%) 11 files
*.cshtml2300 LOC (<1%) 57 files
*.cpp1331 LOC (<1%) 9 files
*.xaml1291 LOC (<1%) 22 files
*.css1129 LOC (<1%) 9 files
*.h963 LOC (<1%) 8 files
*.cmd825 LOC (<1%) 42 files
*.asset540 LOC (<1%) 3 files
*.java522 LOC (<1%) 12 files
*.vcxproj457 LOC (<1%) 3 files
*.yml425 LOC (<1%) 10 files
*.psm1376 LOC (<1%) 1 files
*.py257 LOC (<1%) 1 files
*.wxl129 LOC (<1%) 11 files
*.xml74 LOC (<1%) 1 files
*.reg67 LOC (<1%) 2 files
*.filters53 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/UnitTests?/.*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 8 files match defined criteria (730 lines of code, 0.1% vs. main code):
    • 5 *.cs files (638 lines of code)
    • 2 *.csproj files (73 lines of code)
    • 1 *.tsx files (19 lines of code)
  • " *.cs" is biggest, containing 87.4% of code.
  • " *.tsx" is smallest, containing 2.6% of code.


*.cs638 LOC (87%) 5 files
*.csproj73 LOC (10%) 2 files
*.tsx19 LOC (2%) 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 "[/][/][ ]*".
    • files with paths like ".*/package[-]lock[.]json".
  • 51 files match defined criteria (122,105 lines of code, 12.1% vs. main code):
    • 50 *.cs files (102,281 lines of code)
    • 1 *.json files (19,824 lines of code)
  • " *.cs" is biggest, containing 83.76% of code.
  • " *.json" is smallest, containing 16.24% of code.


*.cs102281 LOC (83%) 50 files
*.json19824 LOC (16%) 1 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 ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]gradle".
  • 195 files match defined criteria (7,762 lines of code, 0.8% vs. main code):
    • 146 *.csproj files (7,029 lines of code)
    • 40 *.sh files (625 lines of code)
    • 7 *.bat files (87 lines of code)
    • 2 *.gradle files (21 lines of code)
  • " *.csproj" is biggest, containing 90.56% of code.
  • " *.gradle" is smallest, containing 0.27% of code.


*.csproj7029 LOC (90%) 146 files
*.sh625 LOC (8%) 40 files
*.bat87 LOC (1%) 7 files
*.gradle21 LOC (<1%) 2 files
Other Code
xsd
ini
profile
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • 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 ".*[.]properties".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 2309 files match defined criteria (83,009 lines of code, 8.2% vs. main code):
    • 2,276 *.xml files (56,523 lines of code)
    • 10 *.json files (20,034 lines of code)
    • 20 *.md files (6,304 lines of code)
    • 1 *.xsd files (118 lines of code)
    • 1 *.ini files (20 lines of code)
    • 1 *.profile files (10 lines of code)
  • " *.xml" is biggest, containing 68.09% of code.
  • " *.profile" is smallest, containing 0.01% of code.


*.xml56523 LOC (68%) 2276 files
*.json20034 LOC (24%) 10 files
*.md6304 LOC (7%) 20 files
*.xsd118 LOC (<1%) 1 files
*.ini20 LOC (<1%) 1 files
*.profile10 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)
  • *.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
  • *.c files are analyzed with CStyleAnalyzer:
    • 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
    • No dependency analysis
  • *.html files are analyzed with HtmlAnalyzer:
    • 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
  • *.wxs 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
  • *.js files are analyzed with JavaScriptAnalyzer:
    • 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
    • No dependency analysis
  • *.tsx files are analyzed with TypeScriptAnalyzer:
    • 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
    • No dependency analysis
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • 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
    • No dependency analysis
  • *.wixproj 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
  • *.cshtml files are analyzed with HtmlAnalyzer:
    • 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
  • *.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
  • *.css files are analyzed with CssAnalyzer:
    • 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
  • *.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
  • *.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
  • *.asset 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
  • *.java files are analyzed with JavaAnalyzer:
    • 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 package names)
  • *.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
  • *.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
  • *.psm1 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
  • *.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
  • *.wxl 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
  • *.xml 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
  • *.reg 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
  • *.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


2022-01-30 10:32