microsoft / GalaxyExplorer
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
meta
mat
asset
shader
anim
txt
cginc
nuspec
gitattributes
  • 16 extensions are included in analyses: meta, cs, mat, asset, prefab, shader, anim, md, unity, txt, cginc, nuspec, yml, json, gitattributes, gitignore
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (2 files).
    • exclude files with path like ".*/[Pp]ackages\/.+\.\d+\/.*" (NuGet) (9 files).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (636 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
    • exclude files with path like ".*[.]txt" (Text files) (16 files).
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.

main440383 LOC (90%) 1357 files
test513 LOC (<1%) 3 files
generated45039 LOC (9%) 2115 files
build and deployment67 LOC (<1%) 4 files
other787 LOC (<1%) 35 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
asset
mat
anim
shader
cginc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1357 files match defined criteria (440,383 lines of code, 100.0% vs. main code):
    • 93 *.asset files (184,789 lines of code)
    • 96 *.prefab files (111,637 lines of code)
    • 830 *.cs files (71,362 lines of code)
    • 213 *.mat files (27,410 lines of code)
    • 39 *.anim files (19,142 lines of code)
    • 11 *.unity files (17,697 lines of code)
    • 62 *.shader files (7,854 lines of code)
    • 8 *.cginc files (446 lines of code)
    • 5 *.yml files (46 lines of code)
  • " *.asset" is biggest, containing 41.96% of code.
  • " *.yml" is smallest, containing 0.01% of code.


*.asset184789 LOC (41%) 93 files
*.prefab111637 LOC (25%) 96 files
*.cs71362 LOC (16%) 830 files
*.mat27410 LOC (6%) 213 files
*.anim19142 LOC (4%) 39 files
*.unity17697 LOC (4%) 11 files
*.shader7854 LOC (1%) 62 files
*.cginc446 LOC (<1%) 8 files
*.yml46 LOC (<1%) 5 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
mat
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 3 files match defined criteria (513 lines of code, 0.1% vs. main code). All matches are in *.mat files.


*.mat513 LOC (100%) 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 ".*[.]meta" AND any line of content like ".*fileFormatVersion[:] .*".
  • 2115 files match defined criteria (45,039 lines of code, 10.2% vs. main code). All matches are in *.meta files.


*.meta45039 LOC (100%) 2115 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
nuspec
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]nuspec".
  • 4 files match defined criteria (67 lines of code, 0.0% vs. main code). All matches are in *.nuspec files.


*.nuspec67 LOC (100%) 4 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[Dd]ocumentation/.*".
  • 35 files match defined criteria (787 lines of code, 0.2% vs. main code):
    • 33 *.md files (594 lines of code)
    • 2 *.json files (193 lines of code)
  • " *.md" is biggest, containing 75.48% of code.
  • " *.json" is smallest, containing 24.52% of code.


*.md594 LOC (75%) 33 files
*.json193 LOC (24%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.asset 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
  • *.prefab 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
  • *.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)
  • *.mat 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
  • *.anim 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
  • *.unity 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
  • *.shader 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
  • *.cginc 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
  • *.yml 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


2022-01-30 13:31