aws / amazon-gamelift-plugin-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
meta
mat
npmignore
txt
csproj
editorconfig
anim
asset
  • 18 extensions are included in analyses: meta, cs, py, ps1, prefab, json, md, mat, yml, xml, gitignore, unity, npmignore, txt, csproj, editorconfig, anim, asset
  • 5 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (12 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 ".*[.]txt" (Text files) (0 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
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.

main26389 LOC (29%) 292 files
test9796 LOC (10%) 68 files
generated6902 LOC (7%) 538 files
build and deployment36 LOC (<1%) 1 files
other47687 LOC (52%) 24 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
mat
anim
asset
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 292 files match defined criteria (26,389 lines of code, 100.0% vs. main code):
    • 242 *.cs files (12,525 lines of code)
    • 10 *.prefab files (5,625 lines of code)
    • 2 *.unity files (3,007 lines of code)
    • 6 *.yml files (2,930 lines of code)
    • 18 *.py files (1,101 lines of code)
    • 8 *.mat files (608 lines of code)
    • 1 *.anim files (548 lines of code)
    • 4 *.ps1 files (24 lines of code)
    • 1 *.asset files (21 lines of code)
  • " *.cs" is biggest, containing 47.46% of code.
  • " *.asset" is smallest, containing 0.08% of code.


*.cs12525 LOC (47%) 242 files
*.prefab5625 LOC (21%) 10 files
*.unity3007 LOC (11%) 2 files
*.yml2930 LOC (11%) 6 files
*.py1101 LOC (4%) 18 files
*.mat608 LOC (2%) 8 files
*.anim548 LOC (2%) 1 files
*.ps124 LOC (<1%) 4 files
*.asset21 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with any line of content like ".*/simpletest/.*".
  • 68 files match defined criteria (9,796 lines of code, 37.1% vs. main code):
    • 62 *.cs files (9,073 lines of code)
    • 5 *.py files (711 lines of code)
    • 1 *.yml files (12 lines of code)
  • " *.cs" is biggest, containing 92.62% of code.
  • " *.yml" is smallest, containing 0.12% of code.


*.cs9073 LOC (92%) 62 files
*.py711 LOC (7%) 5 files
*.yml12 LOC (<1%) 1 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[:] .*".
  • 538 files match defined criteria (6,902 lines of code, 26.2% vs. main code). All matches are in *.meta files.


*.meta6902 LOC (100%) 538 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 ".*/package[.]json".
    • files with paths like ".*[.]csproj".
  • 1 file matches defined criteria (36 lines of code, 0.1% vs. main code). All matches are in *.csproj files.


*.csproj36 LOC (100%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 24 files match defined criteria (47,687 lines of code, 180.7% vs. main code):
    • 6 *.xml files (46,750 lines of code)
    • 9 *.md files (743 lines of code)
    • 9 *.json files (194 lines of code)
  • " *.xml" is biggest, containing 98.04% of code.
  • " *.json" is smallest, containing 0.41% of code.


*.xml46750 LOC (98%) 6 files
*.md743 LOC (1%) 9 files
*.json194 LOC (<1%) 9 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
  • *.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
  • *.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
  • *.py files are analyzed with PythonAnalyzer:
    • 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
  • *.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
  • *.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
  • *.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


2022-01-31 15:37