microsoft / OpenAPI.NET.OData
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
csproj
props
resx
targets
nuspec
proj
editorconfig
cmd
  • 17 extensions are included in analyses: cs, json, xml, yaml, txt, csproj, props, md, yml, resx, targets, ps1, nuspec, gitignore, proj, editorconfig, cmd
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (11 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (8 files).
    • 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) (4 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.

main13057 LOC (7%) 184 files
test70806 LOC (42%) 117 files
generated176 LOC (<1%) 3 files
build and deployment151 LOC (<1%) 6 files
other81953 LOC (49%) 13 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
targets
props
proj
cmd
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 184 files match defined criteria (13,057 lines of code, 100.0% vs. main code):
    • 174 *.cs files (12,688 lines of code)
    • 2 *.ps1 files (218 lines of code)
    • 2 *.targets files (80 lines of code)
    • 4 *.props files (55 lines of code)
    • 1 *.proj files (14 lines of code)
    • 1 *.cmd files (2 lines of code)
  • " *.cs" is biggest, containing 97.17% of code.
  • " *.cmd" is smallest, containing 0.02% of code.


*.cs12688 LOC (97%) 174 files
*.ps1218 LOC (1%) 2 files
*.targets80 LOC (<1%) 2 files
*.props55 LOC (<1%) 4 files
*.proj14 LOC (<1%) 1 files
*.cmd2 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 ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 117 files match defined criteria (70,806 lines of code, 542.3% vs. main code):
    • 8 *.yaml files (56,993 lines of code)
    • 108 *.cs files (13,741 lines of code)
    • 1 *.csproj files (72 lines of code)
  • " *.yaml" is biggest, containing 80.49% of code.
  • " *.csproj" is smallest, containing 0.1% of code.


*.yaml56993 LOC (80%) 8 files
*.cs13741 LOC (19%) 108 files
*.csproj72 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 "[/][/][ ]*".
  • 3 files match defined criteria (176 lines of code, 1.3% vs. main code). All matches are in *.cs files.


*.cs176 LOC (100%) 3 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".
  • 6 files match defined criteria (151 lines of code, 1.2% vs. main code):
    • 4 *.csproj files (93 lines of code)
    • 2 *.nuspec files (58 lines of code)
  • " *.csproj" is biggest, containing 61.59% of code.
  • " *.nuspec" is smallest, containing 38.41% of code.


*.csproj93 LOC (61%) 4 files
*.nuspec58 LOC (38%) 2 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 13 files match defined criteria (81,953 lines of code, 627.7% vs. main code):
    • 8 *.json files (81,158 lines of code)
    • 3 *.xml files (677 lines of code)
    • 2 *.md files (118 lines of code)
  • " *.json" is biggest, containing 99.03% of code.
  • " *.md" is smallest, containing 0.14% of code.


*.json81158 LOC (99%) 8 files
*.xml677 LOC (<1%) 3 files
*.md118 LOC (<1%) 2 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
  • *.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
  • *.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
  • *.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 15:16