microsoft / TailwindTraders-Backend
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
tpl
csproj
dockerignore
props
properties
mod
gitattributes
pb
cmd
  • 22 extensions are included in analyses: cs, yaml, json, js, ps1, txt, go, tpl, java, md, csproj, dockerignore, yml, gitignore, sh, props, properties, mod, gitattributes, xml, pb, cmd
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (20 files).
    • exclude files with path like ".*/mvnw\.cmd" (Maven) (1 file).
    • 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) (14 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.

main9592 LOC (51%) 306 files
test0 LOC (0%) 0 files
generated3231 LOC (17%) 4 files
build and deployment405 LOC (2%) 9 files
other5382 LOC (28%) 48 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
props
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 306 files match defined criteria (9,592 lines of code, 100.0% vs. main code):
    • 137 *.cs files (4,222 lines of code)
    • 94 *.yaml files (2,933 lines of code)
    • 13 *.ps1 files (722 lines of code)
    • 20 *.js files (574 lines of code)
    • 11 *.java files (377 lines of code)
    • 13 *.tpl files (304 lines of code)
    • 14 *.go files (290 lines of code)
    • 2 *.yml files (128 lines of code)
    • 2 *.props files (42 lines of code)
  • " *.cs" is biggest, containing 44.02% of code.
  • " *.props" is smallest, containing 0.44% of code.


*.cs4222 LOC (44%) 137 files
*.yaml2933 LOC (30%) 94 files
*.ps1722 LOC (7%) 13 files
*.js574 LOC (5%) 20 files
*.java377 LOC (3%) 11 files
*.tpl304 LOC (3%) 13 files
*.go290 LOC (3%) 14 files
*.yml128 LOC (1%) 2 files
*.props42 LOC (<1%) 2 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".
  • 4 files match defined criteria (3,231 lines of code, 33.7% vs. main code):
    • 2 *.json files (3,037 lines of code)
    • 2 *.cs files (194 lines of code)
  • " *.json" is biggest, containing 94% of code.
  • " *.cs" is smallest, containing 6% of code.


*.json3037 LOC (93%) 2 files
*.cs194 LOC (6%) 2 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 ".*[.]sh".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*/docker[-]compose[.]yml".
    • files with paths like ".*/[.]mvn/.*".
  • 9 files match defined criteria (405 lines of code, 4.2% vs. main code):
    • 7 *.csproj files (291 lines of code)
    • 1 *.yml files (62 lines of code)
    • 1 *.sh files (52 lines of code)
  • " *.csproj" is biggest, containing 71.85% of code.
  • " *.sh" is smallest, containing 12.84% of code.


*.csproj291 LOC (71%) 7 files
*.yml62 LOC (15%) 1 files
*.sh52 LOC (12%) 1 files
Other Code
mod
properties
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 ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 48 files match defined criteria (5,382 lines of code, 56.1% vs. main code):
    • 23 *.json files (4,242 lines of code)
    • 10 *.md files (763 lines of code)
    • 4 *.ps1 files (141 lines of code)
    • 1 *.xml files (97 lines of code)
    • 7 *.yaml files (91 lines of code)
    • 1 *.sh files (26 lines of code)
    • 1 *.mod files (15 lines of code)
    • 1 *.properties files (7 lines of code)
  • " *.json" is biggest, containing 78.82% of code.
  • " *.properties" is smallest, containing 0.13% of code.


*.json4242 LOC (78%) 23 files
*.md763 LOC (14%) 10 files
*.ps1141 LOC (2%) 4 files
*.xml97 LOC (1%) 1 files
*.yaml91 LOC (1%) 7 files
*.sh26 LOC (<1%) 1 files
*.mod15 LOC (<1%) 1 files
*.properties7 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
  • *.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
  • *.java files are analyzed with JavaAnalyzer:
    • 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 package names)
  • *.tpl 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
  • *.go files are analyzed with GoLangAnalyzer:
    • 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
    • Basic heuristic 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
  • *.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


2022-01-30 22:30