microsoft / xbox-live-unity-plugin
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
asset
csproj
xaml
txt
cmd
DotSettings
gitmodules
vcxproj
shproj
filters
props
  • 23 extensions are included in analyses: cs, meta, h, cpp, xml, asset, prefab, md, csproj, unity, ps1, json, xaml, txt, cmd, DotSettings, gitignore, gitmodules, psm1, vcxproj, shproj, filters, props
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (4 files).
    • exclude files with path like ".*/extern(al)?/.*" (Dependencies) (2 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) (4 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.

main31042 LOC (47%) 396 files
test1804 LOC (2%) 29 files
generated8510 LOC (13%) 169 files
build and deployment305 LOC (<1%) 3 files
other23676 LOC (36%) 40 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
asset
filters
vcxproj
dotsettings
cmd
shproj
props
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 396 files match defined criteria (31,042 lines of code, 100.0% vs. main code):
    • 287 *.cs files (13,040 lines of code)
    • 13 *.prefab files (9,509 lines of code)
    • 27 *.cpp files (3,189 lines of code)
    • 39 *.h files (2,300 lines of code)
    • 15 *.asset files (1,459 lines of code)
    • 1 *.psm1 files (429 lines of code)
    • 5 *.ps1 files (294 lines of code)
    • 1 *.filters files (255 lines of code)
    • 1 *.vcxproj files (245 lines of code)
    • 2 *.dotsettings files (221 lines of code)
    • 3 *.cmd files (79 lines of code)
    • 1 *.shproj files (12 lines of code)
    • 1 *.props files (10 lines of code)
  • " *.cs" is biggest, containing 42.01% of code.
  • " *.props" is smallest, containing 0.03% of code.


*.cs13040 LOC (42%) 287 files
*.prefab9509 LOC (30%) 13 files
*.cpp3189 LOC (10%) 27 files
*.h2300 LOC (7%) 39 files
*.asset1459 LOC (4%) 15 files
*.psm1429 LOC (1%) 1 files
*.ps1294 LOC (<1%) 5 files
*.filters255 LOC (<1%) 1 files
*.vcxproj245 LOC (<1%) 1 files
*.dotsettings221 LOC (<1%) 2 files
*.cmd79 LOC (<1%) 3 files
*.shproj12 LOC (<1%) 1 files
*.props10 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
xaml
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 ".*/IntegrationTests?/.*".
    • files with any line of content like ".*/simpletest/.*".
    • files with paths like ".*UnitTests/.*".
  • 29 files match defined criteria (1,804 lines of code, 5.8% vs. main code):
    • 19 *.cs files (946 lines of code)
    • 5 *.csproj files (631 lines of code)
    • 5 *.xaml files (227 lines of code)
  • " *.cs" is biggest, containing 52.44% of code.
  • " *.xaml" is smallest, containing 12.58% of code.


*.cs946 LOC (52%) 19 files
*.csproj631 LOC (34%) 5 files
*.xaml227 LOC (12%) 5 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[:] .*".
  • 169 files match defined criteria (8,510 lines of code, 27.4% vs. main code). All matches are in *.meta files.


*.meta8510 LOC (100%) 169 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*[.]csproj".
  • 3 files match defined criteria (305 lines of code, 1.0% vs. main code). All matches are in *.csproj files.


*.csproj305 LOC (100%) 3 files
Other Code
meta
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 ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]md".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 40 files match defined criteria (23,676 lines of code, 76.3% vs. main code):
    • 15 *.xml files (17,648 lines of code)
    • 6 *.unity files (5,698 lines of code)
    • 8 *.md files (208 lines of code)
    • 4 *.json files (63 lines of code)
    • 7 *.meta files (59 lines of code)
  • " *.xml" is biggest, containing 74.54% of code.
  • " *.meta" is smallest, containing 0.25% of code.


*.xml17648 LOC (74%) 15 files
*.unity5698 LOC (24%) 6 files
*.md208 LOC (<1%) 8 files
*.json63 LOC (<1%) 4 files
*.meta59 LOC (<1%) 7 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)
  • *.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
  • *.cpp files are analyzed with CppAnalyzer:
    • 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
  • *.h files are analyzed with CppAnalyzer:
    • 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
  • *.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
  • *.psm1 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
  • *.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
  • *.filters 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
  • *.vcxproj 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
  • *.dotsettings 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
  • *.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
  • *.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


2022-01-30 14:14