azure / azure-relay-dotnet
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
cmd
props
csproj
gitattributes
targets
resx
txt
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.

main10354 LOC (75%) 84 files
test2574 LOC (18%) 17 files
generated368 LOC (2%) 1 file
build and deployment111 LOC (<1%) 4 files
other223 LOC (1%) 4 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cmd
props
targets
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 84 files match defined criteria (10,354 LOC, 100.0% vs. main code):
    • 74 *.cs files (9,980 LOC)
    • 3 *.ps1 files (311 LOC)
    • 4 *.cmd files (42 LOC)
    • 2 *.props files (18 LOC)
    • 1 *.targets files (3 LOC)
  • " *.cs" is biggest, containing 96.39% of LOC.
  • " *.targets" is smallest, containing 0.03% of LOC.


*.cs9980 LOC (96%) 74 files
*.ps1311 LOC (3%) 3 files
*.cmd42 LOC (<1%) 4 files
*.props18 LOC (<1%) 2 files
*.targets3 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
cmd
props
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.]UnitTests/.*".
    • files with paths like ".*UnitTests[.][a-zA-Z0-9_]+".
  • 17 files match defined criteria (2,574 LOC, 24.9% vs. main code):
    • 13 *.cs files (2,511 LOC)
    • 1 *.sh files (21 LOC)
    • 1 *.cmd files (18 LOC)
    • 1 *.props files (13 LOC)
    • 1 *.csproj files (11 LOC)
  • " *.cs" is biggest, containing 97.55% of LOC.
  • " *.csproj" is smallest, containing 0.43% of LOC.


*.cs2511 LOC (97%) 13 files
*.sh21 LOC (<1%) 1 file
*.cmd18 LOC (<1%) 1 file
*.props13 LOC (<1%) 1 file
*.csproj11 LOC (<1%) 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 ".*[.]cs" AND any line of content like "[/][/][ ]*".
  • 1 file matches defined criteria (368 LOC, 3.6% vs. main code). All matches are in *.cs files.


*.cs368 LOC (100%) 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 ".*[.]csproj".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]gitattributes".
  • 4 files match defined criteria (111 LOC, 1.1% vs. main code):
    • 3 *.sh files (58 LOC)
    • 1 *.csproj files (53 LOC)
  • " *.sh" is biggest, containing 52.25% of LOC.
  • " *.csproj" is smallest, containing 47.75% of LOC.


*.sh58 LOC (52%) 3 files
*.csproj53 LOC (47%) 1 file
Other Code
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 ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
  • 4 files match defined criteria (223 LOC, 2.2% vs. main code):
    • 2 *.md files (158 LOC)
    • 2 *.json files (65 LOC)
  • " *.md" is biggest, containing 70.85% of LOC.
  • " *.json" is smallest, containing 29.15% of LOC.


*.md158 LOC (70%) 2 files
*.json65 LOC (29%) 2 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)
  • *.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
  • *.cmd 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
  • *.props 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


2025-05-06 21:16