microsoft / dicom-server
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
resx
txt
dockerignore
gitattributes
targets
editorconfig
props
  • 24 extensions are included in analyses: cs, sql, json, md, csproj, yml, ps1, resx, js, psm1, yaml, txt, css, html, psd1, gitignore, dockerignore, gitattributes, targets, xml, MD, editorconfig, ipynb, props
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (16 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (33 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (4 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) (2 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.

main32102 LOC (33%) 710 files
test24378 LOC (25%) 272 files
generated7203 LOC (7%) 7 files
build and deployment646 LOC (<1%) 24 files
other30206 LOC (31%) 139 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
props
targets
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 710 files match defined criteria (32,102 lines of code, 100.0% vs. main code):
    • 660 *.cs files (25,219 lines of code)
    • 1 *.yaml files (4,502 lines of code)
    • 17 *.ps1 files (973 lines of code)
    • 20 *.yml files (684 lines of code)
    • 3 *.js files (300 lines of code)
    • 2 *.html files (145 lines of code)
    • 1 *.md files (141 lines of code)
    • 2 *.psm1 files (60 lines of code)
    • 1 *.props files (48 lines of code)
    • 1 *.psd1 files (15 lines of code)
    • 1 *.css files (10 lines of code)
    • 1 *.targets files (5 lines of code)
  • " *.cs" is biggest, containing 78.56% of code.
  • " *.targets" is smallest, containing 0.02% of code.


*.cs25219 LOC (78%) 660 files
*.yaml4502 LOC (14%) 1 files
*.ps1973 LOC (3%) 17 files
*.yml684 LOC (2%) 20 files
*.js300 LOC (<1%) 3 files
*.html145 LOC (<1%) 2 files
*.md141 LOC (<1%) 1 files
*.psm160 LOC (<1%) 2 files
*.props48 LOC (<1%) 1 files
*.psd115 LOC (<1%) 1 files
*.css10 LOC (<1%) 1 files
*.targets5 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 ".*[-]test[-].*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
    • files with paths like ".*UnitTests/.*".
  • 272 files match defined criteria (24,378 lines of code, 75.9% vs. main code):
    • 261 *.cs files (24,062 lines of code)
    • 10 *.csproj files (273 lines of code)
    • 1 *.yml files (43 lines of code)
  • " *.cs" is biggest, containing 98.7% of code.
  • " *.yml" is smallest, containing 0.18% of code.


*.cs24062 LOC (98%) 261 files
*.csproj273 LOC (1%) 10 files
*.yml43 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 "[/][/][ ]*".
    • files with paths like ".*/package[-]lock[.]json".
  • 7 files match defined criteria (7,203 lines of code, 22.4% vs. main code):
    • 1 *.json files (5,834 lines of code)
    • 6 *.cs files (1,369 lines of code)
  • " *.json" is biggest, containing 80.99% of code.
  • " *.cs" is smallest, containing 19.01% of code.


*.json5834 LOC (80%) 1 files
*.cs1369 LOC (19%) 6 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 ".*/docker[-]compose[.]yaml".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/docker[-]compose[.]yml".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
  • 24 files match defined criteria (646 lines of code, 2.0% vs. main code):
    • 22 *.csproj files (634 lines of code)
    • 1 *.yml files (6 lines of code)
    • 1 *.yaml files (6 lines of code)
  • " *.csproj" is biggest, containing 98.14% of code.
  • " *.yaml" is smallest, containing 0.93% of code.


*.csproj634 LOC (98%) 22 files
*.yml6 LOC (<1%) 1 files
*.yaml6 LOC (<1%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]dockerignore".
    • 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 ".*/[Ss]amples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 139 files match defined criteria (30,206 lines of code, 94.1% vs. main code):
    • 76 *.sql files (20,647 lines of code)
    • 48 *.json files (8,111 lines of code)
    • 7 *.md files (1,122 lines of code)
    • 4 *.ps1 files (223 lines of code)
    • 1 *.yaml files (63 lines of code)
    • 1 *.xml files (17 lines of code)
    • 1 *.psd1 files (15 lines of code)
    • 1 *.psm1 files (8 lines of code)
  • " *.sql" is biggest, containing 68.35% of code.
  • " *.psm1" is smallest, containing 0.03% of code.


*.sql20647 LOC (68%) 76 files
*.json8111 LOC (26%) 48 files
*.md1122 LOC (3%) 7 files
*.ps1223 LOC (<1%) 4 files
*.yaml63 LOC (<1%) 1 files
*.xml17 LOC (<1%) 1 files
*.psd115 LOC (<1%) 1 files
*.psm18 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)
  • *.yaml 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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.md 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
  • *.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
  • *.psd1 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
  • *.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
  • *.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


2022-01-31 01:15