microsoft / AirSim
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
txt
asset
vcxproj
mat
launch
filters
xaml
cmd
ini
cmake
rviz
csproj
tex
clang-format
cls
props
shader
resx
bib
  • 36 extensions are included in analyses: hpp, cpp, py, h, meta, md, cs, txt, sh, asset, bat, vcxproj, json, prefab, mat, launch, filters, xaml, yml, gitignore, cmd, ini, xml, unity, cmake, rviz, csproj, ps1, tex, clang-format, cls, props, shader, rst, resx, bib
  • 7 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (23 files).
    • exclude files with path like ".*[.]resx" (The resx resource files) (1 file).
    • exclude files with path like ".*/docs/.*" (Documentation) (76 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) (25 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.

main165523 LOC (91%) 709 files
test930 LOC (<1%) 15 files
generated1788 LOC (<1%) 98 files
build and deployment1373 LOC (<1%) 40 files
other10667 LOC (5%) 52 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
vcxproj
asset
mat
filters
xaml
cmake
shader
cmd
launch
props
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 709 files match defined criteria (165,523 lines of code, 100.0% vs. main code):
    • 198 *.hpp files (51,291 lines of code)
    • 125 *.cpp files (35,823 lines of code)
    • 5 *.unity files (26,019 lines of code)
    • 82 *.cs files (14,607 lines of code)
    • 12 *.prefab files (14,229 lines of code)
    • 94 *.h files (6,899 lines of code)
    • 100 *.py files (5,606 lines of code)
    • 13 *.vcxproj files (3,967 lines of code)
    • 18 *.asset files (1,691 lines of code)
    • 12 *.mat files (1,449 lines of code)
    • 10 *.filters files (1,264 lines of code)
    • 11 *.xaml files (1,133 lines of code)
    • 5 *.cmake files (497 lines of code)
    • 1 *.shader files (427 lines of code)
    • 2 *.yml files (235 lines of code)
    • 6 *.cmd files (226 lines of code)
    • 12 *.launch files (105 lines of code)
    • 2 *.ps1 files (49 lines of code)
    • 1 *.props files (6 lines of code)
  • " *.hpp" is biggest, containing 30.99% of code.
  • " *.props" is smallest, containing 0% of code.


*.hpp51291 LOC (30%) 198 files
*.cpp35823 LOC (21%) 125 files
*.unity26019 LOC (15%) 5 files
*.cs14607 LOC (8%) 82 files
*.prefab14229 LOC (8%) 12 files
*.h6899 LOC (4%) 94 files
*.py5606 LOC (3%) 100 files
*.vcxproj3967 LOC (2%) 13 files
*.asset1691 LOC (1%) 18 files
*.mat1449 LOC (<1%) 12 files
*.filters1264 LOC (<1%) 10 files
*.xaml1133 LOC (<1%) 11 files
*.cmake497 LOC (<1%) 5 files
*.shader427 LOC (<1%) 1 files
*.yml235 LOC (<1%) 2 files
*.cmd226 LOC (<1%) 6 files
*.launch105 LOC (<1%) 12 files
*.ps149 LOC (<1%) 2 files
*.props6 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
vcxproj
filters
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with any line of content like ".*/simpletest/.*".
    • files with paths like ".*UnitTests/.*".
  • 15 files match defined criteria (930 lines of code, 0.6% vs. main code):
    • 7 *.hpp files (347 lines of code)
    • 1 *.vcxproj files (296 lines of code)
    • 5 *.py files (220 lines of code)
    • 1 *.filters files (48 lines of code)
    • 1 *.cpp files (19 lines of code)
  • " *.hpp" is biggest, containing 37.31% of code.
  • " *.cpp" is smallest, containing 2.04% of code.


*.hpp347 LOC (37%) 7 files
*.vcxproj296 LOC (31%) 1 files
*.py220 LOC (23%) 5 files
*.filters48 LOC (5%) 1 files
*.cpp19 LOC (2%) 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 ".*[.]cs" AND any line of content like "[/][/][ ]*".
    • files with paths like ".*[.]meta" AND any line of content like ".*fileFormatVersion[:] .*".
  • 98 files match defined criteria (1,788 lines of code, 1.1% vs. main code):
    • 96 *.meta files (1,742 lines of code)
    • 2 *.cs files (46 lines of code)
  • " *.meta" is biggest, containing 97.43% of code.
  • " *.cs" is smallest, containing 2.57% of code.


*.meta1742 LOC (97%) 96 files
*.cs46 LOC (2%) 2 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 ".*[.]bat".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]sh".
  • 40 files match defined criteria (1,373 lines of code, 0.8% vs. main code):
    • 23 *.sh files (573 lines of code)
    • 3 *.csproj files (432 lines of code)
    • 14 *.bat files (368 lines of code)
  • " *.sh" is biggest, containing 41.73% of code.
  • " *.bat" is smallest, containing 26.8% of code.


*.sh573 LOC (41%) 23 files
*.csproj432 LOC (31%) 3 files
*.bat368 LOC (26%) 14 files
Other Code
vcxproj
ini
filters
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 52 files match defined criteria (10,667 lines of code, 6.4% vs. main code):
    • 5 *.xml files (7,325 lines of code)
    • 9 *.hpp files (1,093 lines of code)
    • 10 *.json files (958 lines of code)
    • 3 *.h files (439 lines of code)
    • 1 *.vcxproj files (300 lines of code)
    • 15 *.md files (172 lines of code)
    • 6 *.ini files (140 lines of code)
    • 1 *.cpp files (123 lines of code)
    • 1 *.filters files (66 lines of code)
    • 1 *.bat files (51 lines of code)
  • " *.xml" is biggest, containing 68.67% of code.
  • " *.bat" is smallest, containing 0.48% of code.


*.xml7325 LOC (68%) 5 files
*.hpp1093 LOC (10%) 9 files
*.json958 LOC (8%) 10 files
*.h439 LOC (4%) 3 files
*.vcxproj300 LOC (2%) 1 files
*.md172 LOC (1%) 15 files
*.ini140 LOC (1%) 6 files
*.cpp123 LOC (1%) 1 files
*.filters66 LOC (<1%) 1 files
*.bat51 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.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
  • *.launch 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
  • *.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:48