microsoft / Oryx
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
cshtml
csproj
ejs
razor
styl
tpl
editorconfig
gitattributes
mdx
snap
pug
babelrc
ru
jade
cfg
eslintignore
mako
fs
ini
resx
properties
mod
dockerignore
mk
in
props
cmd
fsproj
targets
sed
m4
proj
prettierignore
po
  • 63 extensions are included in analyses: cs, js, py, json, md, html, ts, css, sh, svg, Dockerfile, txt, yml, toml, gitignore, cshtml, scss, csproj, jsx, go, rb, ejs, razor, styl, xml, vue, tpl, yaml, php, editorconfig, ipynb, java, gitattributes, mdx, snap, pug, babelrc, ru, jade, erb, cfg, eslintignore, jsp, mako, fs, ini, resx, properties, mod, dockerignore, ps1, mk, in, props, cmd, fsproj, targets, sed, m4, proj, cjs, prettierignore, po
  • 18 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (150 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (2 files).
    • exclude files with path like ".*/dist/.*" (Distributions) (59 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) (16 files).
    • 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 ".*[.]min[.]js" (Minimized JS library) (15 files).
    • exclude files with path like ".*/mvnw\.cmd" (Maven) (1 file).
    • exclude files with path like ".*[.]m4" (stuff autogenerated by autoconf - still C deps) (1 file).
    • exclude files with path like ".*/docs/.*" (Documentation) (8 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) (86 files).
    • exclude files with path like ".*/bootstrap[-].*" (Library) (3 files).
    • exclude files with path like ".*/static/js/.*" (JS library) (1 file).
    • exclude files with path like ".*/(vuejs|js/lib)/.*" (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.

main26777 LOC (6%) 495 files
test81854 LOC (20%) 1795 files
generated129741 LOC (32%) 26 files
build and deployment5075 LOC (1%) 108 files
other154872 LOC (38%) 491 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
targets
proj
props
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 495 files match defined criteria (26,777 lines of code, 100.0% vs. main code):
    • 314 *.cs files (14,628 lines of code)
    • 87 *.dockerfile files (6,418 lines of code)
    • 38 *.yml files (2,269 lines of code)
    • 33 *.go files (2,132 lines of code)
    • 13 *.tpl files (821 lines of code)
    • 1 *.yaml files (318 lines of code)
    • 5 *.toml files (139 lines of code)
    • 1 *.targets files (22 lines of code)
    • 1 *.proj files (19 lines of code)
    • 1 *.props files (7 lines of code)
    • 1 *.ps1 files (4 lines of code)
  • " *.cs" is biggest, containing 54.63% of code.
  • " *.ps1" is smallest, containing 0.01% of code.


*.cs14628 LOC (54%) 314 files
*.dockerfile6418 LOC (23%) 87 files
*.yml2269 LOC (8%) 38 files
*.go2132 LOC (7%) 33 files
*.tpl821 LOC (3%) 13 files
*.yaml318 LOC (1%) 1 files
*.toml139 LOC (<1%) 5 files
*.targets22 LOC (<1%) 1 files
*.proj19 LOC (<1%) 1 files
*.props7 LOC (<1%) 1 files
*.ps14 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
styl
cshtml
csproj
razor
ejs
snap
po
fs
mako
mk
pug
jade
fsproj
ru
in
cfg
sed
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]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*__tests__.*".
    • files with paths like ".*[.]spec[.]js".
    • files with paths like ".*[.]snap".
    • files with paths like ".*[.]spec[.]ts".
    • files with paths like ".*/protractor[.]conf[.]js".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/karma[.]conf[.]js".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 1795 files match defined criteria (81,854 lines of code, 305.7% vs. main code):
    • 326 *.cs files (35,322 lines of code)
    • 95 *.css files (9,291 lines of code)
    • 242 *.js files (8,339 lines of code)
    • 194 *.ts files (6,619 lines of code)
    • 256 *.py files (5,057 lines of code)
    • 197 *.html files (4,348 lines of code)
    • 48 *.jsx files (2,935 lines of code)
    • 64 *.toml files (1,475 lines of code)
    • 6 *.yaml files (1,169 lines of code)
    • 15 *.styl files (1,061 lines of code)
    • 60 *.cshtml files (1,032 lines of code)
    • 14 *.vue files (869 lines of code)
    • 55 *.scss files (737 lines of code)
    • 48 *.csproj files (736 lines of code)
    • 29 *.yml files (561 lines of code)
    • 25 *.razor files (463 lines of code)
    • 29 *.ejs files (361 lines of code)
    • 7 *.go files (348 lines of code)
    • 4 *.snap files (262 lines of code)
    • 1 *.po files (246 lines of code)
    • 29 *.rb files (142 lines of code)
    • 10 *.sh files (139 lines of code)
    • 12 *.php files (97 lines of code)
    • 2 *.fs files (36 lines of code)
    • 4 *.java files (36 lines of code)
    • 2 *.mako files (32 lines of code)
    • 3 *.erb files (26 lines of code)
    • 2 *.dockerfile files (24 lines of code)
    • 1 *.mk files (17 lines of code)
    • 3 *.pug files (16 lines of code)
    • 3 *.jade files (16 lines of code)
    • 1 *.fsproj files (12 lines of code)
    • 3 *.ru files (11 lines of code)
    • 2 *.jsp files (10 lines of code)
    • 1 *.in files (4 lines of code)
    • 1 *.cfg files (3 lines of code)
    • 1 *.sed files (2 lines of code)
  • " *.cs" is biggest, containing 43.15% of code.
  • " *.sed" is smallest, containing 0% of code.


*.cs35322 LOC (43%) 326 files
*.css9291 LOC (11%) 95 files
*.js8339 LOC (10%) 242 files
*.ts6619 LOC (8%) 194 files
*.py5057 LOC (6%) 256 files
*.html4348 LOC (5%) 197 files
*.jsx2935 LOC (3%) 48 files
*.toml1475 LOC (1%) 64 files
*.yaml1169 LOC (1%) 6 files
*.styl1061 LOC (1%) 15 files
*.cshtml1032 LOC (1%) 60 files
*.vue869 LOC (1%) 14 files
*.scss737 LOC (<1%) 55 files
*.csproj736 LOC (<1%) 48 files
*.yml561 LOC (<1%) 29 files
*.razor463 LOC (<1%) 25 files
*.ejs361 LOC (<1%) 29 files
*.go348 LOC (<1%) 7 files
*.snap262 LOC (<1%) 4 files
*.po246 LOC (<1%) 1 files
*.rb142 LOC (<1%) 29 files
*.sh139 LOC (<1%) 10 files
*.php97 LOC (<1%) 12 files
*.fs36 LOC (<1%) 2 files
*.java36 LOC (<1%) 4 files
*.mako32 LOC (<1%) 2 files
*.erb26 LOC (<1%) 3 files
*.dockerfile24 LOC (<1%) 2 files
*.mk17 LOC (<1%) 1 files
*.pug16 LOC (<1%) 3 files
*.jade16 LOC (<1%) 3 files
*.fsproj12 LOC (<1%) 1 files
*.ru11 LOC (<1%) 3 files
*.jsp10 LOC (<1%) 2 files
*.in4 LOC (<1%) 1 files
*.cfg3 LOC (<1%) 1 files
*.sed2 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".
  • 26 files match defined criteria (129,741 lines of code, 484.5% vs. main code):
    • 24 *.json files (129,630 lines of code)
    • 2 *.cs files (111 lines of code)
  • " *.json" is biggest, containing 99.91% of code.
  • " *.cs" is smallest, containing 0.09% of code.


*.json129630 LOC (99%) 24 files
*.cs111 LOC (<1%) 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 ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*[.]mk".
    • files with paths like ".*/[.]mvn/.*".
  • 108 files match defined criteria (5,075 lines of code, 19.0% vs. main code):
    • 101 *.sh files (4,789 lines of code)
    • 7 *.csproj files (286 lines of code)
  • " *.sh" is biggest, containing 94.36% of code.
  • " *.csproj" is smallest, containing 5.64% of code.


*.sh4789 LOC (94%) 101 files
*.csproj286 LOC (5%) 7 files
Other Code
mdx
ini
mod
properties
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 ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • 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 ".*[.]editorconfig".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*[.]mdx".
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 491 files match defined criteria (154,872 lines of code, 578.4% vs. main code):
    • 199 *.json files (143,034 lines of code)
    • 201 *.md files (8,743 lines of code)
    • 64 *.svg files (2,046 lines of code)
    • 15 *.xml files (651 lines of code)
    • 2 *.ipynb files (190 lines of code)
    • 4 *.mdx files (119 lines of code)
    • 2 *.ini files (68 lines of code)
    • 2 *.java files (18 lines of code)
    • 1 *.mod files (2 lines of code)
    • 1 *.properties files (1 lines of code)
  • " *.json" is biggest, containing 92.36% of code.
  • " *.properties" is smallest, containing 0% of code.


*.json143034 LOC (92%) 199 files
*.md8743 LOC (5%) 201 files
*.svg2046 LOC (1%) 64 files
*.xml651 LOC (<1%) 15 files
*.ipynb190 LOC (<1%) 2 files
*.mdx119 LOC (<1%) 4 files
*.ini68 LOC (<1%) 2 files
*.java18 LOC (<1%) 2 files
*.mod2 LOC (<1%) 1 files
*.properties1 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)
  • *.dockerfile 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
  • *.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
  • *.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
  • *.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
  • *.toml 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
  • *.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
  • *.proj 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
  • *.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
  • *.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


2022-01-30 22:30