microsoft / Docker-Provider
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
cmd
mod
gitattributes
ini
tpl
csproj
y
  • 23 extensions are included in analyses: rb, json, sh, yaml, py, md, ps1, go, yml, txt, cmd, mod, gitattributes, xml, MD, cpp, svg, ini, gitignore, cs, tpl, csproj, y
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (27 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) (6 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.

main26787 LOC (50%) 192 files
test4604 LOC (8%) 59 files
generated436 LOC (<1%) 1 files
build and deployment3724 LOC (7%) 27 files
other17091 LOC (32%) 81 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
y
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 192 files match defined criteria (26,787 lines of code, 100.0% vs. main code):
    • 128 *.rb files (14,447 lines of code)
    • 19 *.ps1 files (4,636 lines of code)
    • 23 *.yaml files (3,188 lines of code)
    • 8 *.go files (2,692 lines of code)
    • 8 *.py files (1,205 lines of code)
    • 1 *.cs files (350 lines of code)
    • 1 *.y files (104 lines of code)
    • 1 *.cpp files (102 lines of code)
    • 1 *.tpl files (30 lines of code)
    • 1 *.md files (22 lines of code)
    • 1 *.yml files (11 lines of code)
  • " *.rb" is biggest, containing 53.93% of code.
  • " *.yml" is smallest, containing 0.04% of code.


*.rb14447 LOC (53%) 128 files
*.ps14636 LOC (17%) 19 files
*.yaml3188 LOC (11%) 23 files
*.go2692 LOC (10%) 8 files
*.py1205 LOC (4%) 8 files
*.cs350 LOC (1%) 1 files
*.y104 LOC (<1%) 1 files
*.cpp102 LOC (<1%) 1 files
*.tpl30 LOC (<1%) 1 files
*.md22 LOC (<1%) 1 files
*.yml11 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*[-]tests[-].*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 59 files match defined criteria (4,604 lines of code, 17.2% vs. main code):
    • 23 *.py files (1,662 lines of code)
    • 8 *.yaml files (1,374 lines of code)
    • 23 *.rb files (1,264 lines of code)
    • 3 *.sh files (179 lines of code)
    • 2 *.go files (125 lines of code)
  • " *.py" is biggest, containing 36.1% of code.
  • " *.go" is smallest, containing 2.72% of code.


*.py1662 LOC (36%) 23 files
*.yaml1374 LOC (29%) 8 files
*.rb1264 LOC (27%) 23 files
*.sh179 LOC (3%) 3 files
*.go125 LOC (2%) 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 ".*[.]rb" AND any line of content like "# This file is automatically generated by Racc.*".
  • 1 file matches defined criteria (436 lines of code, 1.6% vs. main code). All matches are in *.rb files.


*.rb436 LOC (100%) 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 ".*[.]sh".
    • files with paths like ".*[.]csproj".
  • 27 files match defined criteria (3,724 lines of code, 13.9% vs. main code):
    • 26 *.sh files (3,713 lines of code)
    • 1 *.csproj files (11 lines of code)
  • " *.sh" is biggest, containing 99.7% of code.
  • " *.csproj" is smallest, containing 0.3% of code.


*.sh3713 LOC (99%) 26 files
*.csproj11 LOC (<1%) 1 files
Other Code
mod
ini
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 ".*[.]md".
    • files with paths like ".*/[Dd]ocumentation/.*".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 81 files match defined criteria (17,091 lines of code, 63.8% vs. main code):
    • 54 *.json files (14,938 lines of code)
    • 23 *.md files (1,715 lines of code)
    • 1 *.xml files (351 lines of code)
    • 1 *.svg files (66 lines of code)
    • 1 *.mod files (18 lines of code)
    • 1 *.ini files (3 lines of code)
  • " *.json" is biggest, containing 87.4% of code.
  • " *.ini" is smallest, containing 0.02% of code.


*.json14938 LOC (87%) 54 files
*.md1715 LOC (10%) 23 files
*.xml351 LOC (2%) 1 files
*.svg66 LOC (<1%) 1 files
*.mod18 LOC (<1%) 1 files
*.ini3 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic 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
  • *.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
  • *.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
  • *.py files are analyzed with PythonAnalyzer:
    • 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
  • *.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)
  • *.y 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
  • *.cpp files are analyzed with CppAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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


2022-01-30 13:33