microsoft / WinAppDriver
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
props
txt
gitattributes
feature
vcxproj
resx
gitmodules
  • 22 extensions are included in analyses: cs, xml, xaml, md, csproj, ts, json, js, cpp, gitignore, h, props, rb, yml, txt, py, gitattributes, java, feature, vcxproj, resx, gitmodules
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (74 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) (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.

main13498 LOC (49%) 163 files
test8168 LOC (30%) 79 files
generated46 LOC (<1%) 2 files
build and deployment1025 LOC (3%) 4 files
other4416 LOC (16%) 104 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
xaml
vcxproj
props
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 163 files match defined criteria (13,498 lines of code, 100.0% vs. main code):
    • 90 *.cs files (7,447 lines of code)
    • 62 *.xaml files (4,863 lines of code)
    • 4 *.cpp files (829 lines of code)
    • 1 *.vcxproj files (181 lines of code)
    • 4 *.h files (164 lines of code)
    • 2 *.props files (14 lines of code)
  • " *.cs" is biggest, containing 55.17% of code.
  • " *.props" is smallest, containing 0.1% of code.


*.cs7447 LOC (55%) 90 files
*.xaml4863 LOC (36%) 62 files
*.cpp829 LOC (6%) 4 files
*.vcxproj181 LOC (1%) 1 files
*.h164 LOC (1%) 4 files
*.props14 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
props
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*[.]feature".
    • files with paths like ".*/[Tt]ests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 79 files match defined criteria (8,168 lines of code, 60.5% vs. main code):
    • 74 *.cs files (7,726 lines of code)
    • 4 *.csproj files (436 lines of code)
    • 1 *.props files (6 lines of code)
  • " *.cs" is biggest, containing 94.59% of code.
  • " *.props" is smallest, containing 0.07% of code.


*.cs7726 LOC (94%) 74 files
*.csproj436 LOC (5%) 4 files
*.props6 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 "[/][/][ ]*".
  • 2 files match defined criteria (46 lines of code, 0.3% vs. main code). All matches are in *.cs files.


*.cs46 LOC (100%) 2 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 ".*/[.]gitmodules".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*/package[.]json".
  • 4 files match defined criteria (1,025 lines of code, 7.6% vs. main code). All matches are in *.csproj files.


*.csproj1025 LOC (100%) 4 files
Other Code
csproj
feature
props
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 ".*[.]txt".
    • files with paths like ".*[.]md".
    • 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)".
  • 104 files match defined criteria (4,416 lines of code, 32.7% vs. main code):
    • 29 *.cs files (1,761 lines of code)
    • 33 *.md files (1,022 lines of code)
    • 8 *.csproj files (786 lines of code)
    • 11 *.ts files (208 lines of code)
    • 7 *.json files (150 lines of code)
    • 4 *.js files (116 lines of code)
    • 4 *.rb files (105 lines of code)
    • 1 *.java files (95 lines of code)
    • 1 *.py files (64 lines of code)
    • 1 *.feature files (56 lines of code)
    • 4 *.xml files (47 lines of code)
    • 1 *.props files (6 lines of code)
  • " *.cs" is biggest, containing 39.88% of code.
  • " *.props" is smallest, containing 0.14% of code.


*.cs1761 LOC (39%) 29 files
*.md1022 LOC (23%) 33 files
*.csproj786 LOC (17%) 8 files
*.ts208 LOC (4%) 11 files
*.json150 LOC (3%) 7 files
*.js116 LOC (2%) 4 files
*.rb105 LOC (2%) 4 files
*.java95 LOC (2%) 1 files
*.py64 LOC (1%) 1 files
*.feature56 LOC (1%) 1 files
*.xml47 LOC (1%) 4 files
*.props6 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)
  • *.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
  • *.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
  • *.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
  • *.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


2022-01-30 13:33