JetBrains / resharper-unity
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
asset
meta
shader
csproj
txt
hlsl
props
targets
anim
dotsettings
resx
lex
properties
editorconfig
gitattributes
cmd
nuspec
xaml
shproj
xsd
cginc
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.

main109634 LOC (40%) 1,767 files
test145945 LOC (54%) 2,583 files
generated3624 LOC (1%) 453 files
build and deployment1227 LOC (<1%) 30 files
other9345 LOC (3%) 472 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
lex
xaml
cmd
props
targets
shproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1767 files match defined criteria (109,634 LOC, 100.0% vs. main code):
    • 1,481 *.cs files (89,344 LOC)
    • 228 *.kt files (13,334 LOC)
    • 20 *.xml files (5,000 LOC)
    • 3 *.kts files (712 LOC)
    • 6 *.lex files (476 LOC)
    • 2 *.xaml files (242 LOC)
    • 1 *.cmd files (198 LOC)
    • 12 *.props files (136 LOC)
    • 11 *.targets files (135 LOC)
    • 2 *.ps1 files (46 LOC)
    • 1 *.shproj files (11 LOC)
  • " *.cs" is biggest, containing 81.49% of LOC.
  • " *.shproj" is smallest, containing 0.01% of LOC.


*.cs89344 LOC (81%) 1,481 files
*.kt13334 LOC (12%) 228 files
*.xml5000 LOC (4%) 20 files
*.kts712 LOC (<1%) 3 files
*.lex476 LOC (<1%) 6 files
*.xaml242 LOC (<1%) 2 files
*.cmd198 LOC (<1%) 1 file
*.props136 LOC (<1%) 12 files
*.targets135 LOC (<1%) 11 files
*.ps146 LOC (<1%) 2 files
*.shproj11 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
asset
anim
shader
csproj
cmd
hlsl
targets
cginc
props
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]ests/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]ests/.*".
  • 2583 files match defined criteria (145,945 LOC, 133.1% vs. main code):
    • 470 *.asset files (40,436 LOC)
    • 55 *.unity files (31,109 LOC)
    • 1,380 *.cs files (30,146 LOC)
    • 8 *.anim files (19,202 LOC)
    • 67 *.prefab files (10,594 LOC)
    • 320 *.shader files (6,614 LOC)
    • 39 *.kt files (4,201 LOC)
    • 46 *.csproj files (2,446 LOC)
    • 164 *.yaml files (805 LOC)
    • 1 *.cmd files (198 LOC)
    • 22 *.hlsl files (73 LOC)
    • 3 *.targets files (42 LOC)
    • 4 *.xml files (36 LOC)
    • 1 *.cginc files (25 LOC)
    • 3 *.props files (18 LOC)
  • " *.asset" is biggest, containing 27.71% of LOC.
  • " *.props" is smallest, containing 0.01% of LOC.


*.asset40436 LOC (27%) 470 files
*.unity31109 LOC (21%) 55 files
*.cs30146 LOC (20%) 1,380 files
*.anim19202 LOC (13%) 8 files
*.prefab10594 LOC (7%) 67 files
*.shader6614 LOC (4%) 320 files
*.kt4201 LOC (2%) 39 files
*.csproj2446 LOC (1%) 46 files
*.yaml805 LOC (<1%) 164 files
*.cmd198 LOC (<1%) 1 file
*.hlsl73 LOC (<1%) 22 files
*.targets42 LOC (<1%) 3 files
*.xml36 LOC (<1%) 4 files
*.cginc25 LOC (<1%) 1 file
*.props18 LOC (<1%) 3 files
Generated Code
Automatically generated files, not manually changed after generation.
meta
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 ".*[.]meta" AND any line of content like ".*fileFormatVersion[:] .*".
  • 453 files match defined criteria (3,624 LOC, 3.3% vs. main code):
    • 446 *.meta files (3,443 LOC)
    • 7 *.cs files (181 LOC)
  • " *.meta" is biggest, containing 95.01% of LOC.
  • " *.cs" is smallest, containing 4.99% of LOC.


*.meta3443 LOC (95%) 446 files
*.cs181 LOC (4%) 7 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]nuspec".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]bat".
  • 30 files match defined criteria (1,227 LOC, 1.1% vs. main code):
    • 26 *.csproj files (1,007 LOC)
    • 1 *.bat files (131 LOC)
    • 2 *.nuspec files (85 LOC)
    • 1 *.sh files (4 LOC)
  • " *.csproj" is biggest, containing 82.07% of LOC.
  • " *.sh" is smallest, containing 0.33% of LOC.


*.csproj1007 LOC (82%) 26 files
*.bat131 LOC (10%) 1 file
*.nuspec85 LOC (6%) 2 files
*.sh4 LOC (<1%) 1 file
Other Code
txt
properties
xsd
meta
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]svg".
    • files with paths like ".*/resources/.*[.]xsd".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 472 files match defined criteria (9,345 LOC, 8.5% vs. main code):
    • 87 *.md files (4,842 LOC)
    • 73 *.json files (2,241 LOC)
    • 262 *.svg files (1,279 LOC)
    • 42 *.txt files (583 LOC)
    • 5 *.properties files (356 LOC)
    • 1 *.xsd files (30 LOC)
    • 2 *.meta files (14 LOC)
  • " *.md" is biggest, containing 51.81% of LOC.
  • " *.meta" is smallest, containing 0.15% of LOC.


*.md4842 LOC (51%) 87 files
*.json2241 LOC (23%) 73 files
*.svg1279 LOC (13%) 262 files
*.txt583 LOC (6%) 42 files
*.properties356 LOC (3%) 5 files
*.xsd30 LOC (<1%) 1 file
*.meta14 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)
  • *.kt files are analyzed with KotlinAnalyzer:
    • 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 (based on imports and package statements)
  • *.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
  • *.kts files are analyzed with KotlinAnalyzer:
    • 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 (based on imports and package statements)
  • *.lex 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
  • *.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
  • *.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
  • *.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
  • *.shproj 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 16:45