epam / Sitecore-Reference-Storefront-on-Habitat
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
cshtml
csproj
feature
txt
coffee
jshintrc
wsdl
editorconfig
nuspec
npmignore
asax
gitattributes
targets
jscsrc
eps
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.

main69663 LOC (59%) 808 files
test14146 LOC (12%) 193 files
generated11245 LOC (9%) 28 files
build and deployment5907 LOC (5%) 29 files
other16149 LOC (13%) 21 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cshtml
targets
asax
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 808 files match defined criteria (69,663 LOC, 100.0% vs. main code):
    • 14 *.css files (27,422 LOC)
    • 429 *.cs files (20,795 LOC)
    • 186 *.scss files (8,083 LOC)
    • 53 *.js files (7,261 LOC)
    • 117 *.cshtml files (5,996 LOC)
    • 7 *.xml files (100 LOC)
    • 1 *.targets files (5 LOC)
    • 1 *.asax files (1 LOC)
  • " *.css" is biggest, containing 39.36% of LOC.
  • " *.asax" is smallest, containing 0% of LOC.


*.css27422 LOC (39%) 14 files
*.cs20795 LOC (29%) 429 files
*.scss8083 LOC (11%) 186 files
*.js7261 LOC (10%) 53 files
*.cshtml5996 LOC (8%) 117 files
*.xml100 LOC (<1%) 7 files
*.targets5 LOC (<1%) 1 file
*.asax1 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
feature
wsdl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*[.]feature".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]ests/.*".
  • 193 files match defined criteria (14,146 LOC, 20.3% vs. main code):
    • 139 *.cs files (6,536 LOC)
    • 26 *.csproj files (3,800 LOC)
    • 26 *.feature files (2,220 LOC)
    • 2 *.wsdl files (1,590 LOC)
  • " *.cs" is biggest, containing 46.2% of LOC.
  • " *.wsdl" is smallest, containing 11.24% of LOC.


*.cs6536 LOC (46%) 139 files
*.csproj3800 LOC (26%) 26 files
*.feature2220 LOC (15%) 26 files
*.wsdl1590 LOC (11%) 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 ".*[.]feature[.]cs".
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
    • files with paths like ".*[.](ps|eps|pfa)".
  • 28 files match defined criteria (11,245 LOC, 16.1% vs. main code). All matches are in *.cs files.


*.cs11245 LOC (100%) 28 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 ".*[.]csproj".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]nuspec".
  • 29 files match defined criteria (5,907 LOC, 8.5% vs. main code). All matches are in *.csproj files.


*.csproj5907 LOC (100%) 29 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Dd]emos?/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]npmignore".
  • 21 files match defined criteria (16,149 LOC, 23.2% vs. main code):
    • 12 *.svg files (15,814 LOC)
    • 7 *.json files (251 LOC)
    • 2 *.md files (84 LOC)
  • " *.svg" is biggest, containing 97.93% of LOC.
  • " *.md" is smallest, containing 0.52% of LOC.


*.svg15814 LOC (97%) 12 files
*.json251 LOC (1%) 7 files
*.md84 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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)
  • *.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
  • *.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
  • *.xml 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
  • *.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
  • *.asax 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


2025-01-10 14:14