microsoft / fhir-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
http
shproj
resx
cshtml
txt
dockerignore
gitattributes
editorconfig
props
tpl
  • 25 extensions are included in analyses: cs, json, sql, md, yml, csproj, yaml, http, ps1, shproj, xml, sh, resx, js, cshtml, html, gitignore, psm1, psd1, txt, dockerignore, gitattributes, editorconfig, props, tpl
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (22 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (104 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (6 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) (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.

main54970 LOC (28%) 1083 files
test49004 LOC (25%) 471 files
generated1555 LOC (<1%) 6 files
build and deployment663 LOC (<1%) 23 files
other84261 LOC (44%) 348 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
props
shproj
cshtml
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1083 files match defined criteria (54,970 lines of code, 100.0% vs. main code):
    • 1,026 *.cs files (51,730 lines of code)
    • 35 *.yml files (2,177 lines of code)
    • 8 *.ps1 files (560 lines of code)
    • 4 *.js files (338 lines of code)
    • 1 *.props files (60 lines of code)
    • 4 *.shproj files (57 lines of code)
    • 3 *.cshtml files (23 lines of code)
    • 1 *.psd1 files (15 lines of code)
    • 1 *.psm1 files (10 lines of code)
  • " *.cs" is biggest, containing 94.11% of code.
  • " *.psm1" is smallest, containing 0.02% of code.


*.cs51730 LOC (94%) 1026 files
*.yml2177 LOC (3%) 35 files
*.ps1560 LOC (1%) 8 files
*.js338 LOC (<1%) 4 files
*.props60 LOC (<1%) 1 files
*.shproj57 LOC (<1%) 4 files
*.cshtml23 LOC (<1%) 3 files
*.psd115 LOC (<1%) 1 files
*.psm110 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
shproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*[-]tests[-].*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*/Mocks/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with any line of content like ".*/simpletest/.*".
    • files with paths like ".*UnitTests/.*".
  • 471 files match defined criteria (49,004 lines of code, 89.1% vs. main code):
    • 443 *.cs files (47,793 lines of code)
    • 18 *.csproj files (954 lines of code)
    • 2 *.yml files (142 lines of code)
    • 8 *.shproj files (115 lines of code)
  • " *.cs" is biggest, containing 97.53% of code.
  • " *.shproj" is smallest, containing 0.23% of code.


*.cs47793 LOC (97%) 443 files
*.csproj954 LOC (1%) 18 files
*.yml142 LOC (<1%) 2 files
*.shproj115 LOC (<1%) 8 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 "[/][/][ ]*".
  • 6 files match defined criteria (1,555 lines of code, 2.8% vs. main code). All matches are in *.cs files.


*.cs1555 LOC (100%) 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 ".*/docker[-]compose[.]yml".
    • files with paths like ".*[.]sh".
    • 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".
  • 23 files match defined criteria (663 lines of code, 1.2% vs. main code):
    • 21 *.csproj files (628 lines of code)
    • 2 *.yaml files (35 lines of code)
  • " *.csproj" is biggest, containing 94.72% of code.
  • " *.yaml" is smallest, containing 5.28% of code.


*.csproj628 LOC (94%) 21 files
*.yaml35 LOC (5%) 2 files
Other Code
tpl
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]editorconfig".
    • 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)".
  • 348 files match defined criteria (84,261 lines of code, 153.3% vs. main code):
    • 116 *.sql files (47,468 lines of code)
    • 174 *.json files (32,544 lines of code)
    • 9 *.md files (1,447 lines of code)
    • 10 *.xml files (1,043 lines of code)
    • 19 *.yaml files (651 lines of code)
    • 7 *.ps1 files (481 lines of code)
    • 3 *.sh files (310 lines of code)
    • 3 *.html files (139 lines of code)
    • 3 *.cs files (72 lines of code)
    • 1 *.tpl files (65 lines of code)
    • 1 *.csproj files (17 lines of code)
    • 1 *.psd1 files (15 lines of code)
    • 1 *.psm1 files (9 lines of code)
  • " *.sql" is biggest, containing 56.33% of code.
  • " *.psm1" is smallest, containing 0.01% of code.


*.sql47468 LOC (56%) 116 files
*.json32544 LOC (38%) 174 files
*.md1447 LOC (1%) 9 files
*.xml1043 LOC (1%) 10 files
*.yaml651 LOC (<1%) 19 files
*.ps1481 LOC (<1%) 7 files
*.sh310 LOC (<1%) 3 files
*.html139 LOC (<1%) 3 files
*.cs72 LOC (<1%) 3 files
*.tpl65 LOC (<1%) 1 files
*.csproj17 LOC (<1%) 1 files
*.psd115 LOC (<1%) 1 files
*.psm19 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)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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


2022-01-30 22:04