azure / openapi-diff
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
proj
csproj
resx
gitattributes
jsonc
txt
prettierignore
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.

main4097 LOC (11%) 57 files
test1861 LOC (5%) 23 files
generated7560 LOC (20%) 4 files
build and deployment113 LOC (<1%) 3 files
other23586 LOC (63%) 146 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 57 files match defined criteria (4,097 LOC, 100.0% vs. main code):
    • 39 *.cs files (2,840 LOC)
    • 9 *.ts files (1,158 LOC)
    • 7 *.proj files (51 LOC)
    • 1 *.js files (34 LOC)
    • 1 *.ps1 files (14 LOC)
  • " *.cs" is biggest, containing 69.32% of LOC.
  • " *.ps1" is smallest, containing 0.34% of LOC.


*.cs2840 LOC (69%) 39 files
*.ts1158 LOC (28%) 9 files
*.proj51 LOC (1%) 7 files
*.js34 LOC (<1%) 1 file
*.ps114 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]est/.*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
  • 23 files match defined criteria (1,861 LOC, 45.4% vs. main code):
    • 21 *.ts files (1,013 LOC)
    • 1 *.cs files (749 LOC)
    • 1 *.csproj files (99 LOC)
  • " *.ts" is biggest, containing 54.43% of LOC.
  • " *.csproj" is smallest, containing 5.32% of LOC.


*.ts1013 LOC (54%) 21 files
*.cs749 LOC (40%) 1 file
*.csproj99 LOC (5%) 1 file
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 "[/][/][ ]*".
  • 4 files match defined criteria (7,560 LOC, 184.5% vs. main code):
    • 1 *.json files (6,955 LOC)
    • 3 *.cs files (605 LOC)
  • " *.json" is biggest, containing 92% of LOC.
  • " *.cs" is smallest, containing 8% of LOC.


*.json6955 LOC (91%) 1 file
*.cs605 LOC (8%) 3 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 ".*/package[-]lock[.]json".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]csproj".
  • 3 files match defined criteria (113 LOC, 2.8% vs. main code). All matches are in *.csproj files.


*.csproj113 LOC (100%) 3 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[.]prettierignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
  • 146 files match defined criteria (23,586 LOC, 575.7% vs. main code):
    • 139 *.json files (22,813 LOC)
    • 7 *.md files (773 LOC)
  • " *.json" is biggest, containing 96.72% of LOC.
  • " *.md" is smallest, containing 3.28% of LOC.


*.json22813 LOC (96%) 139 files
*.md773 LOC (3%) 7 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)
  • *.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
  • *.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
  • *.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
  • *.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


2025-05-06 21:22