OrchardCore
Source Code Overview

Source Code Analysis Scope
Files includes and excluded from analyses
  • 13 extensions are included in analyses: cs, cshtml, js, csproj, css, scss, md, json, svg, html, ts, yml, txt
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (13 files).
    • exclude files with path like ".*/vendor/.*" (3rd party libraries) (40 files).
    • exclude files with path like ".*/.*[.]min[.]js" (Minimized JS library) (16 files).
    • exclude files with path like "(?i).*/jquery.*[.]js" (jQuery files) (10 files).
    • exclude files with path like "(?i).*bootstrap[.]css" (Bootstrap CSS files) (1 file).
    • exclude files with path like ".*/bootstrap[.]js" (3rd party library) (1 file).
    • exclude files with path like ".*/docs/.*" (Documentation) (122 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.

main219564 LOC (62%) 4276 files
generated40326 LOC (11%) 61 files
build and deployment40058 LOC (11%) 38 files
other38538 LOC (10%) 209 files
test14249 LOC (4%) 146 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 4276 files match defined criteria (219,564 lines of code, 100.0% vs. main code):
    • 3,022 *.cs files (126,834 lines of code)
    • 102 *.js files (39,533 lines of code)
    • 948 *.cshtml files (21,543 lines of code)
    • 48 *.css files (21,421 lines of code)
    • 103 *.scss files (5,408 lines of code)
    • 45 *.json files (4,151 lines of code)
    • 8 *.ts files (674 lines of code)
  • " *.cs" is biggest, containing 57.77% of code.
  • " *.ts" is smallest, containing 0.31% of code.


*.cs126834 LOC (57%) 3022 files
*.js39533 LOC (18%) 102 files
*.cshtml21543 LOC (9%) 948 files
*.css21421 LOC (9%) 48 files
*.scss5408 LOC (2%) 103 files
*.json4151 LOC (1%) 45 files
*.ts674 LOC (<1%) 8 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
  • The following criteria are used to filter files:
    • files with paths like ".*/test/.*".
    • files with paths like ".*[.]test[.].*".
  • 146 files match defined criteria (14,249 lines of code, 6.5% vs. main code):
    • 94 *.cs files (8,895 lines of code)
    • 5 *.json files (4,790 lines of code)
    • 3 *.js files (219 lines of code)
    • 10 *.csproj files (196 lines of code)
    • 34 *.cshtml files (149 lines of code)
  • " *.cs" is biggest, containing 62.43% of code.
  • " *.cshtml" is smallest, containing 1.05% of code.


*.cs8895 LOC (62%) 94 files
*.json4790 LOC (33%) 5 files
*.js219 LOC (1%) 3 files
*.csproj196 LOC (1%) 10 files
*.cshtml149 LOC (1%) 34 files
Generated Code
Automatically generated files, not manually changed after generation.
  • The following criteria are used to filter files:
    • files with any line of content like "[ ]*[*][*][ ]*NOTE[:] This file is generated by.*".
  • 61 files match defined criteria (40,326 lines of code, 18.4% vs. main code):
    • 38 *.js files (21,032 lines of code)
    • 23 *.css files (19,294 lines of code)
  • " *.js" is biggest, containing 52.15% of code.
  • " *.css" is smallest, containing 47.85% of code.


*.js21032 LOC (52%) 38 files
*.css19294 LOC (47%) 23 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
  • The following criteria are used to filter files:
    • files with paths like ".*/gulpfile[.]js".
    • files with paths like ".*[.]yml".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
  • 38 files match defined criteria (40,058 lines of code, 18.2% vs. main code):
    • 32 *.json files (39,257 lines of code)
    • 4 *.js files (540 lines of code)
    • 2 *.yml files (261 lines of code)
  • " *.json" is biggest, containing 98% of code.
  • " *.yml" is smallest, containing 0.65% of code.


*.json39257 LOC (98%) 32 files
*.js540 LOC (1%) 4 files
*.yml261 LOC (<1%) 2 files
Other Code
  • The following criteria are used to filter files:
    • files with paths like ".*[.]html".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]csproj".
  • 209 files match defined criteria (38,538 lines of code, 17.6% vs. main code):
    • 1 *.txt files (21,479 lines of code)
    • 26 *.svg files (12,306 lines of code)
    • 164 *.csproj files (2,872 lines of code)
    • 9 *.html files (1,308 lines of code)
    • 9 *.md files (573 lines of code)
  • " *.txt" is biggest, containing 55.73% of code.
  • " *.md" is smallest, containing 1.49% of code.


*.txt21479 LOC (55%) 1 files
*.svg12306 LOC (31%) 26 files
*.csproj2872 LOC (7%) 164 files
*.html1308 LOC (3%) 9 files
*.md573 LOC (1%) 9 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)
  • *.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
  • *.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
  • *.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
  • *.scss files are analyzed with ScssAnalyzer:
    • 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
  • *.json files are analyzed with JsonAnalyzer:
    • 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
  • *.ts files are analyzed with TypeScriptAnalyzer:
    • 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


2020-09-12 21:36