microsoft / TestAdapterForGoogleTest
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
vcxproj
filters
txt
resx
proj
xsd
props
xaml
vsixmanifest
vstemplate
gitattributes
targets
nuspec
shproj
gitconfig
gitmodules
xslt
  • 30 extensions are included in analyses: cs, xml, cpp, gitignore, md, csproj, h, vcxproj, filters, txt, resx, ps1, bat, cc, proj, xsd, props, xaml, vsixmanifest, yml, vstemplate, asm, gitattributes, targets, json, nuspec, shproj, gitconfig, gitmodules, xslt
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (28 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (9 files).
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (8 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) (9 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.

main13665 LOC (45%) 241 files
test7154 LOC (23%) 76 files
generated1364 LOC (4%) 8 files
build and deployment2027 LOC (6%) 18 files
other6072 LOC (20%) 60 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
vcxproj
filters
xaml
proj
vsixmanifest
vstemplate
targets
props
shproj
xslt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 241 files match defined criteria (13,665 lines of code, 100.0% vs. main code):
    • 151 *.cs files (9,400 lines of code)
    • 16 *.vcxproj files (2,259 lines of code)
    • 7 *.ps1 files (428 lines of code)
    • 13 *.h files (358 lines of code)
    • 14 *.filters files (350 lines of code)
    • 3 *.xaml files (332 lines of code)
    • 19 *.cpp files (121 lines of code)
    • 4 *.proj files (94 lines of code)
    • 2 *.vsixmanifest files (81 lines of code)
    • 2 *.yml files (80 lines of code)
    • 2 *.vstemplate files (48 lines of code)
    • 1 *.targets files (40 lines of code)
    • 3 *.props files (36 lines of code)
    • 1 *.shproj files (13 lines of code)
    • 2 *.asm files (13 lines of code)
    • 1 *.xslt files (12 lines of code)
  • " *.cs" is biggest, containing 68.79% of code.
  • " *.xslt" is smallest, containing 0.09% of code.


*.cs9400 LOC (68%) 151 files
*.vcxproj2259 LOC (16%) 16 files
*.ps1428 LOC (3%) 7 files
*.h358 LOC (2%) 13 files
*.filters350 LOC (2%) 14 files
*.xaml332 LOC (2%) 3 files
*.cpp121 LOC (<1%) 19 files
*.proj94 LOC (<1%) 4 files
*.vsixmanifest81 LOC (<1%) 2 files
*.yml80 LOC (<1%) 2 files
*.vstemplate48 LOC (<1%) 2 files
*.targets40 LOC (<1%) 1 files
*.props36 LOC (<1%) 3 files
*.shproj13 LOC (<1%) 1 files
*.asm13 LOC (<1%) 2 files
*.xslt12 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
vcxproj
filters
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 ".*/TestData/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 76 files match defined criteria (7,154 lines of code, 52.4% vs. main code):
    • 51 *.cs files (5,568 lines of code)
    • 6 *.csproj files (788 lines of code)
    • 9 *.cpp files (511 lines of code)
    • 1 *.vcxproj files (176 lines of code)
    • 1 *.filters files (54 lines of code)
    • 4 *.bat files (27 lines of code)
    • 1 *.ps1 files (19 lines of code)
    • 3 *.h files (11 lines of code)
  • " *.cs" is biggest, containing 77.83% of code.
  • " *.h" is smallest, containing 0.15% of code.


*.cs5568 LOC (77%) 51 files
*.csproj788 LOC (11%) 6 files
*.cpp511 LOC (7%) 9 files
*.vcxproj176 LOC (2%) 1 files
*.filters54 LOC (<1%) 1 files
*.bat27 LOC (<1%) 4 files
*.ps119 LOC (<1%) 1 files
*.h11 LOC (<1%) 3 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 "[/][/][ ]*".
  • 8 files match defined criteria (1,364 lines of code, 10.0% vs. main code). All matches are in *.cs files.


*.cs1364 LOC (100%) 8 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 ".*/[.]gitconfig".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*[.]bat".
  • 18 files match defined criteria (2,027 lines of code, 14.8% vs. main code):
    • 16 *.csproj files (1,986 lines of code)
    • 1 *.nuspec files (33 lines of code)
    • 1 *.bat files (8 lines of code)
  • " *.csproj" is biggest, containing 97.98% of code.
  • " *.bat" is smallest, containing 0.39% of code.


*.csproj1986 LOC (97%) 16 files
*.nuspec33 LOC (1%) 1 files
*.bat8 LOC (<1%) 1 files
Other Code
xsd
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 ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 60 files match defined criteria (6,072 lines of code, 44.4% vs. main code):
    • 34 *.xml files (5,659 lines of code)
    • 23 *.md files (282 lines of code)
    • 3 *.xsd files (131 lines of code)
  • " *.xml" is biggest, containing 93.2% of code.
  • " *.xsd" is smallest, containing 2.16% of code.


*.xml5659 LOC (93%) 34 files
*.md282 LOC (4%) 23 files
*.xsd131 LOC (2%) 3 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)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.proj 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
  • *.vsixmanifest 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
  • *.vstemplate 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
  • *.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
  • *.shproj 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
  • *.asm 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
  • *.xslt 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 14:59