JetBrains / teamcity-dotnet-samples
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
xaml
razor
txt
cshtml
axml
dotsettings
resx
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.

main1010 LOC (40%) 58 files
test116 LOC (4%) 3 files
generated46 LOC (1%) 2 files
build and deployment547 LOC (21%) 13 files
other797 LOC (31%) 10 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
razor
xaml
cshtml
axml
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 58 files match defined criteria (1,010 LOC, 100.0% vs. main code):
    • 37 *.cs files (637 LOC)
    • 1 *.css files (148 LOC)
    • 5 *.razor files (64 LOC)
    • 6 *.xaml files (57 LOC)
    • 2 *.cshtml files (46 LOC)
    • 5 *.xml files (39 LOC)
    • 2 *.axml files (19 LOC)
  • " *.cs" is biggest, containing 63.07% of LOC.
  • " *.axml" is smallest, containing 1.88% of LOC.


*.cs637 LOC (63%) 37 files
*.css148 LOC (14%) 1 file
*.razor64 LOC (6%) 5 files
*.xaml57 LOC (5%) 6 files
*.cshtml46 LOC (4%) 2 files
*.xml39 LOC (3%) 5 files
*.axml19 LOC (1%) 2 files
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[.].*".
  • 3 files match defined criteria (116 LOC, 11.5% vs. main code):
    • 2 *.cs files (99 LOC)
    • 1 *.csproj files (17 LOC)
  • " *.cs" is biggest, containing 85.34% of LOC.
  • " *.csproj" is smallest, containing 14.66% of LOC.


*.cs99 LOC (85%) 2 files
*.csproj17 LOC (14%) 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 "[/][/][ ]*".
  • 2 files match defined criteria (46 LOC, 4.6% vs. main code). All matches are in *.cs files.


*.cs46 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 ".*/pom[.]xml".
    • files with paths like ".*[.]dockerfile".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 13 files match defined criteria (547 LOC, 54.2% vs. main code):
    • 8 *.csproj files (512 LOC)
    • 4 *.dockerfile files (30 LOC)
    • 1 *.xml files (5 LOC)
  • " *.csproj" is biggest, containing 93.6% of LOC.
  • " *.xml" is smallest, containing 0.91% of LOC.


*.csproj512 LOC (93%) 8 files
*.dockerfile30 LOC (5%) 4 files
*.xml5 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 ".*/[.]dockerignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]gitignore".
  • 10 files match defined criteria (797 LOC, 78.9% vs. main code):
    • 1 *.svg files (543 LOC)
    • 3 *.md files (137 LOC)
    • 4 *.json files (64 LOC)
    • 2 *.txt files (53 LOC)
  • " *.svg" is biggest, containing 68.13% of LOC.
  • " *.txt" is smallest, containing 6.65% of LOC.


*.svg543 LOC (68%) 1 file
*.md137 LOC (17%) 3 files
*.json64 LOC (8%) 4 files
*.txt53 LOC (6%) 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)
  • *.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
  • *.razor 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
  • *.xaml 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
  • *.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
  • *.axml 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


2026-01-18 17:15