epam / sitecore-engx-scaffold
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
csproj
dotsettings
txt
gitattributes
targets
cake
ashx
asmx
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.

main1797 LOC (21%) 41 files
test183 LOC (2%) 9 files
generated2680 LOC (31%) 2 files
build and deployment415 LOC (4%) 12 files
other3391 LOC (40%) 25 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cake
targets
asmx
ashx
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 41 files match defined criteria (1,797 LOC, 100.0% vs. main code):
    • 14 *.js files (765 LOC)
    • 16 *.cs files (504 LOC)
    • 1 *.htm files (236 LOC)
    • 2 *.ps1 files (203 LOC)
    • 1 *.cake files (59 LOC)
    • 1 *.targets files (20 LOC)
    • 1 *.tsx files (5 LOC)
    • 3 *.ts files (3 LOC)
    • 1 *.asmx files (1 LOC)
    • 1 *.ashx files (1 LOC)
  • " *.js" is biggest, containing 42.57% of LOC.
  • " *.ashx" is smallest, containing 0.06% of LOC.


*.js765 LOC (42%) 14 files
*.cs504 LOC (28%) 16 files
*.htm236 LOC (13%) 1 file
*.ps1203 LOC (11%) 2 files
*.cake59 LOC (3%) 1 file
*.targets20 LOC (1%) 1 file
*.tsx5 LOC (<1%) 1 file
*.ts3 LOC (<1%) 3 files
*.asmx1 LOC (<1%) 1 file
*.ashx1 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • 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 ".*/jest[.][a-zA-Z0-9\.]+".
  • 9 files match defined criteria (183 LOC, 10.2% vs. main code):
    • 5 *.cs files (141 LOC)
    • 1 *.js files (33 LOC)
    • 1 *.ts files (5 LOC)
    • 2 *.csproj files (4 LOC)
  • " *.cs" is biggest, containing 77.05% of LOC.
  • " *.csproj" is smallest, containing 2.19% of LOC.


*.cs141 LOC (77%) 5 files
*.js33 LOC (18%) 1 file
*.ts5 LOC (2%) 1 file
*.csproj4 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 ".*/package[-]lock[.]json".
    • files with paths like ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 2 files match defined criteria (2,680 LOC, 149.1% vs. main code):
    • 1 *.json files (2,664 LOC)
    • 1 *.cs files (16 LOC)
  • " *.json" is biggest, containing 99.4% of LOC.
  • " *.cs" is smallest, containing 0.6% of LOC.


*.json2664 LOC (99%) 1 file
*.cs16 LOC (<1%) 1 file
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 ".*/[.]gitignore".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
  • 12 files match defined criteria (415 LOC, 23.1% vs. main code):
    • 5 *.js files (254 LOC)
    • 5 *.csproj files (144 LOC)
    • 1 *.html files (16 LOC)
    • 1 *.tsx files (1 LOC)
  • " *.js" is biggest, containing 61.2% of LOC.
  • " *.tsx" is smallest, containing 0.24% of LOC.


*.js254 LOC (61%) 5 files
*.csproj144 LOC (34%) 5 files
*.html16 LOC (3%) 1 file
*.tsx1 LOC (<1%) 1 file
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
  • 25 files match defined criteria (3,391 LOC, 188.7% vs. main code):
    • 15 *.json files (3,214 LOC)
    • 9 *.md files (176 LOC)
    • 1 *.txt files (1 LOC)
  • " *.json" is biggest, containing 94.78% of LOC.
  • " *.txt" is smallest, containing 0.03% of LOC.


*.json3214 LOC (94%) 15 files
*.md176 LOC (5%) 9 files
*.txt1 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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)
  • *.htm 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
  • *.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
  • *.cake 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)
  • *.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
  • *.tsx 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
  • *.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
  • *.asmx 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
  • *.ashx 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:07