microsoft / WingtipTicketsSaaS-DbPerTenant
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
resx
cshtml
txt
csproj
xproj
gitattributes
targets
  • 19 extensions are included in analyses: ps1, sql, cs, json, js, resx, cshtml, svg, psm1, css, txt, csproj, md, xproj, html, gitattributes, targets, htm, gitignore
  • 13 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (6 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (15 files).
    • exclude files with path like ".*[.]min[.]js" (Minimized JS library) (1 file).
    • exclude files with path like ".*/dist/.*" (Distributions) (6 files).
    • exclude files with path like ".*/bootstrap[.](js|css|less|scss|styl)" (Bootstrap) (0 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (1 file).
    • exclude files with path like ".*/jquery([^.]*)\.validate(\.unobtrusive)?\.js" (jQuery validation plugin (MS bundles this with asp.net mvc)) (0 files).
    • exclude files with path like ".*jquery[.].*[.]js" (jQuery library) (0 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) (3 files).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (0 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.

main19755 LOC (15%) 150 files
test1458 LOC (1%) 16 files
generated0 LOC (0%) 0 files
build and deployment361 LOC (<1%) 2 files
other103996 LOC (82%) 115 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cshtml
targets
xproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 150 files match defined criteria (19,755 lines of code, 100.0% vs. main code):
    • 68 *.ps1 files (9,741 lines of code)
    • 9 *.psm1 files (4,626 lines of code)
    • 50 *.cs files (2,420 lines of code)
    • 3 *.css files (1,707 lines of code)
    • 15 *.cshtml files (962 lines of code)
    • 1 *.html files (163 lines of code)
    • 1 *.targets files (104 lines of code)
    • 1 *.xproj files (27 lines of code)
    • 2 *.js files (5 lines of code)
  • " *.ps1" is biggest, containing 49.31% of code.
  • " *.js" is smallest, containing 0.03% of code.


*.ps19741 LOC (49%) 68 files
*.psm14626 LOC (23%) 9 files
*.cs2420 LOC (12%) 50 files
*.css1707 LOC (8%) 3 files
*.cshtml962 LOC (4%) 15 files
*.html163 LOC (<1%) 1 files
*.targets104 LOC (<1%) 1 files
*.xproj27 LOC (<1%) 1 files
*.js5 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
xproj
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/.*".
  • 16 files match defined criteria (1,458 lines of code, 7.4% vs. main code):
    • 13 *.cs files (1,092 lines of code)
    • 1 *.csproj files (177 lines of code)
    • 1 *.html files (163 lines of code)
    • 1 *.xproj files (26 lines of code)
  • " *.cs" is biggest, containing 74.9% of code.
  • " *.xproj" is smallest, containing 1.78% of code.


*.cs1092 LOC (74%) 13 files
*.csproj177 LOC (12%) 1 files
*.html163 LOC (11%) 1 files
*.xproj26 LOC (1%) 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 ".*[.]csproj".
  • 2 files match defined criteria (361 lines of code, 1.8% vs. main code). All matches are in *.csproj files.


*.csproj361 LOC (100%) 2 files
Other Code
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 ".*[.]svg".
    • files with paths like ".*[.]md".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 115 files match defined criteria (103,996 lines of code, 526.4% vs. main code):
    • 5 *.svg files (84,609 lines of code)
    • 44 *.json files (17,592 lines of code)
    • 64 *.sql files (1,750 lines of code)
    • 2 *.md files (45 lines of code)
  • " *.svg" is biggest, containing 81.36% of code.
  • " *.md" is smallest, containing 0.04% of code.


*.svg84609 LOC (81%) 5 files
*.json17592 LOC (16%) 44 files
*.sql1750 LOC (1%) 64 files
*.md45 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.xproj 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


2022-01-30 15:21