azure / Bridge-To-Kubernetes
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
txt
resx
targets
proj
nuspec
editorconfig
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.

main28333 LOC (72%) 386 files
test5363 LOC (13%) 53 files
generated977 LOC (2%) 5 files
build and deployment929 LOC (2%) 18 files
other3350 LOC (8%) 48 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
targets
proj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 386 files match defined criteria (28,333 LOC, 100.0% vs. main code):
    • 373 *.cs files (28,042 LOC)
    • 6 *.ps1 files (200 LOC)
    • 2 *.targets files (31 LOC)
    • 2 *.yaml files (31 LOC)
    • 2 *.proj files (24 LOC)
    • 1 *.xml files (5 LOC)
  • " *.cs" is biggest, containing 98.97% of LOC.
  • " *.xml" is smallest, containing 0.02% of LOC.


*.cs28042 LOC (98%) 373 files
*.ps1200 LOC (<1%) 6 files
*.targets31 LOC (<1%) 2 files
*.yaml31 LOC (<1%) 2 files
*.proj24 LOC (<1%) 2 files
*.xml5 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 ".*_test[.].*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*[.]tests[.].*".
    • files with paths like ".*/TestData/.*".
    • files with paths like ".*/[Tt]ests/.*".
  • 53 files match defined criteria (5,363 LOC, 18.9% vs. main code):
    • 46 *.cs files (4,965 LOC)
    • 6 *.csproj files (248 LOC)
    • 1 *.sh files (150 LOC)
  • " *.cs" is biggest, containing 92.58% of LOC.
  • " *.sh" is smallest, containing 2.8% of LOC.


*.cs4965 LOC (92%) 46 files
*.csproj248 LOC (4%) 6 files
*.sh150 LOC (2%) 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 "[/][/][ ]*".
  • 5 files match defined criteria (977 LOC, 3.4% vs. main code). All matches are in *.cs files.


*.cs977 LOC (100%) 5 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
nuspec
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 18 files match defined criteria (929 LOC, 3.3% vs. main code):
    • 10 *.csproj files (496 LOC)
    • 7 *.sh files (418 LOC)
    • 1 *.nuspec files (15 LOC)
  • " *.csproj" is biggest, containing 53.39% of LOC.
  • " *.nuspec" is smallest, containing 1.61% of LOC.


*.csproj496 LOC (53%) 10 files
*.sh418 LOC (44%) 7 files
*.nuspec15 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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 48 files match defined criteria (3,350 LOC, 11.8% vs. main code):
    • 13 *.txt files (1,948 LOC)
    • 24 *.md files (1,121 LOC)
    • 9 *.json files (232 LOC)
    • 2 *.svg files (49 LOC)
  • " *.txt" is biggest, containing 58.15% of LOC.
  • " *.svg" is smallest, containing 1.46% of LOC.


*.txt1948 LOC (58%) 13 files
*.md1121 LOC (33%) 24 files
*.json232 LOC (6%) 9 files
*.svg49 LOC (1%) 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
  • *.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
  • *.yaml files are analyzed with YamlAnalyzer:
    • 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
  • *.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
  • *.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


2025-05-06 22:32