azure / azure-saas
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
txt
csproj
editorconfig
mod
gitattributes
nuspec
stylelintignore
http
gitmodules
eslintignore
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.

main9209 LOC (46%) 217 files
test455 LOC (2%) 15 files
generated2839 LOC (14%) 2 files
build and deployment5427 LOC (27%) 89 files
other1859 LOC (9%) 50 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cshtml
http
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 217 files match defined criteria (9,209 LOC, 100.0% vs. main code):
    • 150 *.cs files (4,942 LOC)
    • 40 *.cshtml files (1,542 LOC)
    • 6 *.xml files (1,155 LOC)
    • 4 *.css files (822 LOC)
    • 13 *.py files (683 LOC)
    • 3 *.js files (45 LOC)
    • 1 *.http files (20 LOC)
  • " *.cs" is biggest, containing 53.66% of LOC.
  • " *.http" is smallest, containing 0.22% of LOC.


*.cs4942 LOC (53%) 150 files
*.cshtml1542 LOC (16%) 40 files
*.xml1155 LOC (12%) 6 files
*.css822 LOC (8%) 4 files
*.py683 LOC (7%) 13 files
*.js45 LOC (<1%) 3 files
*.http20 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 ".*/TestUtilities/.*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/karma[.]conf[.]js".
  • 15 files match defined criteria (455 LOC, 4.9% vs. main code):
    • 12 *.cs files (389 LOC)
    • 3 *.csproj files (66 LOC)
  • " *.cs" is biggest, containing 85.49% of LOC.
  • " *.csproj" is smallest, containing 14.51% of LOC.


*.cs389 LOC (85%) 12 files
*.csproj66 LOC (14%) 3 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".
    • files with paths like ".*[.](html|html|xhtml)" AND any line of content like "[ ]*[<]meta name[=]"generator" .*".
  • 2 files match defined criteria (2,839 LOC, 30.8% vs. main code). All matches are in *.cs files.


*.cs2839 LOC (100%) 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 ".*[.]csproj".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*([.]|/)webpack([.]|/).*".
    • files with paths like ".*/[.]gitmodules".
  • 89 files match defined criteria (5,427 LOC, 58.9% vs. main code):
    • 80 *.sh files (5,245 LOC)
    • 9 *.csproj files (182 LOC)
  • " *.sh" is biggest, containing 96.65% of LOC.
  • " *.csproj" is smallest, containing 3.35% of LOC.


*.sh5245 LOC (96%) 80 files
*.csproj182 LOC (3%) 9 files
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/vendor/.*".
    • files with paths like ".*/[.]stylelintignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]eslintignore".
    • files with paths like ".*/go[.]mod".
  • 50 files match defined criteria (1,859 LOC, 20.2% vs. main code):
    • 25 *.json files (959 LOC)
    • 17 *.md files (716 LOC)
    • 4 *.svg files (110 LOC)
    • 4 *.txt files (74 LOC)
  • " *.json" is biggest, containing 51.59% of LOC.
  • " *.txt" is smallest, containing 3.98% of LOC.


*.json959 LOC (51%) 25 files
*.md716 LOC (38%) 17 files
*.svg110 LOC (5%) 4 files
*.txt74 LOC (3%) 4 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)
  • *.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
  • *.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
  • *.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
  • *.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
  • *.http 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


2025-05-06 22:13