microsoft / xbox-live-api
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
lua
fx
filters
vcxproj
cmd
fxh
props
txt
hlsli
gitattributes
inl
hlsl
csproj
cmake
gitmodules
  • 28 extensions are included in analyses: h, cpp, lua, hpp, c, fx, mm, filters, vcxproj, md, cmd, json, fxh, props, txt, css, html, gitignore, cs, hlsli, gitattributes, xml, inc, inl, hlsl, csproj, cmake, gitmodules
  • 5 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 ".*/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.

main108757 LOC (42%) 437 files
test137619 LOC (53%) 462 files
generated30 LOC (<1%) 1 files
build and deployment53 LOC (<1%) 1 files
other11604 LOC (4%) 16 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
filters
vcxproj
props
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 437 files match defined criteria (108,757 lines of code, 100.0% vs. main code):
    • 156 *.cpp files (43,088 lines of code)
    • 200 *.h files (36,443 lines of code)
    • 47 *.hpp files (20,260 lines of code)
    • 7 *.filters files (5,301 lines of code)
    • 7 *.vcxproj files (2,441 lines of code)
    • 11 *.mm files (789 lines of code)
    • 6 *.props files (362 lines of code)
    • 2 *.cs files (68 lines of code)
    • 1 *.cmake files (5 lines of code)
  • " *.cpp" is biggest, containing 39.62% of code.
  • " *.cmake" is smallest, containing 0% of code.


*.cpp43088 LOC (39%) 156 files
*.h36443 LOC (33%) 200 files
*.hpp20260 LOC (18%) 47 files
*.filters5301 LOC (4%) 7 files
*.vcxproj2441 LOC (2%) 7 files
*.mm789 LOC (<1%) 11 files
*.props362 LOC (<1%) 6 files
*.cs68 LOC (<1%) 2 files
*.cmake5 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
lua
inl
fx
vcxproj
filters
fxh
cmd
hlsli
hlsl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/UnitTests?/.*".
    • files with paths like ".*/Mocks/.*".
    • files with paths like ".*[-]tests[-].*".
    • files with any line of content like ".*/simpletest/.*".
    • files with paths like ".*UnitTests/.*".
  • 462 files match defined criteria (137,619 lines of code, 126.5% vs. main code):
    • 152 *.cpp files (67,820 lines of code)
    • 127 *.h files (23,297 lines of code)
    • 33 *.c files (13,824 lines of code)
    • 2 *.hpp files (11,006 lines of code)
    • 3 *.html files (8,335 lines of code)
    • 105 *.lua files (3,558 lines of code)
    • 1 *.inl files (3,009 lines of code)
    • 11 *.fx files (1,907 lines of code)
    • 3 *.vcxproj files (1,879 lines of code)
    • 4 *.filters files (1,506 lines of code)
    • 6 *.fxh files (684 lines of code)
    • 9 *.cmd files (372 lines of code)
    • 3 *.css files (169 lines of code)
    • 1 *.inc files (148 lines of code)
    • 1 *.hlsli files (80 lines of code)
    • 1 *.hlsl files (25 lines of code)
  • " *.cpp" is biggest, containing 49.28% of code.
  • " *.hlsl" is smallest, containing 0.02% of code.


*.cpp67820 LOC (49%) 152 files
*.h23297 LOC (16%) 127 files
*.c13824 LOC (10%) 33 files
*.hpp11006 LOC (7%) 2 files
*.html8335 LOC (6%) 3 files
*.lua3558 LOC (2%) 105 files
*.inl3009 LOC (2%) 1 files
*.fx1907 LOC (1%) 11 files
*.vcxproj1879 LOC (1%) 3 files
*.filters1506 LOC (1%) 4 files
*.fxh684 LOC (<1%) 6 files
*.cmd372 LOC (<1%) 9 files
*.css169 LOC (<1%) 3 files
*.inc148 LOC (<1%) 1 files
*.hlsli80 LOC (<1%) 1 files
*.hlsl25 LOC (<1%) 1 files
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 ".*[.]h" AND any line of content like ".* DO NOT EDIT THIS FILE [-] it is machine generated .*".
  • 1 file matches defined criteria (30 lines of code, 0.0% vs. main code). All matches are in *.h files.


*.h30 LOC (100%) 1 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 ".*/[.]gitattributes".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*[.]csproj".
  • 1 file matches defined criteria (53 lines of code, 0.0% vs. main code). All matches are in *.csproj files.


*.csproj53 LOC (100%) 1 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 ".*[.]md".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 16 files match defined criteria (11,604 lines of code, 10.7% vs. main code):
    • 6 *.json files (11,289 lines of code)
    • 9 *.md files (283 lines of code)
    • 1 *.xml files (32 lines of code)
  • " *.json" is biggest, containing 97.29% of code.
  • " *.xml" is smallest, containing 0.28% of code.


*.json11289 LOC (97%) 6 files
*.md283 LOC (2%) 9 files
*.xml32 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.hpp 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
  • *.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
  • *.mm 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
  • *.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
  • *.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)
  • *.cmake 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-30 14:10