microsoft / malmo
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
txt
in
xsd
i
vsh
launch
fsh
properties
gitattributes
cfg
csproj
cmake
  • 31 extensions are included in analyses: java, py, cpp, xml, txt, h, md, dockerfile, in, sh, cs, xsd, bat, gitignore, i, vsh, ps1, json, launch, fsh, properties, gitattributes, psm1, yml, html, c, cfg, hpp, gradle, csproj, cmake
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (9 files).
    • exclude files with path like ".*/gradle/wrapper/.*" (Gradle) (1 file).
    • 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) (37 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.

main34837 LOC (59%) 255 files
test1686 LOC (2%) 30 files
generated0 LOC (0%) 0 files
build and deployment1551 LOC (2%) 20 files
other19995 LOC (34%) 124 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
i
fsh
cmake
vsh
launch
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 255 files match defined criteria (34,837 lines of code, 100.0% vs. main code):
    • 136 *.java files (20,079 lines of code)
    • 8 *.in files (5,500 lines of code)
    • 31 *.cpp files (4,774 lines of code)
    • 32 *.h files (1,485 lines of code)
    • 32 *.py files (1,345 lines of code)
    • 3 *.i files (860 lines of code)
    • 2 *.ps1 files (281 lines of code)
    • 1 *.hpp files (201 lines of code)
    • 1 *.psm1 files (174 lines of code)
    • 2 *.fsh files (47 lines of code)
    • 1 *.cmake files (45 lines of code)
    • 2 *.vsh files (15 lines of code)
    • 1 *.launch files (12 lines of code)
    • 1 *.html files (10 lines of code)
    • 1 *.c files (6 lines of code)
    • 1 *.cfg files (3 lines of code)
  • " *.java" is biggest, containing 57.64% of code.
  • " *.cfg" is smallest, containing 0.01% of code.


*.java20079 LOC (57%) 136 files
*.in5500 LOC (15%) 8 files
*.cpp4774 LOC (13%) 31 files
*.h1485 LOC (4%) 32 files
*.py1345 LOC (3%) 32 files
*.i860 LOC (2%) 3 files
*.ps1281 LOC (<1%) 2 files
*.hpp201 LOC (<1%) 1 files
*.psm1174 LOC (<1%) 1 files
*.fsh47 LOC (<1%) 2 files
*.cmake45 LOC (<1%) 1 files
*.vsh15 LOC (<1%) 2 files
*.launch12 LOC (<1%) 1 files
*.html10 LOC (<1%) 1 files
*.c6 LOC (<1%) 1 files
*.cfg3 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 ".*_test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 30 files match defined criteria (1,686 lines of code, 4.8% vs. main code):
    • 11 *.cpp files (817 lines of code)
    • 6 *.java files (345 lines of code)
    • 5 *.cs files (302 lines of code)
    • 8 *.py files (222 lines of code)
  • " *.cpp" is biggest, containing 48.46% of code.
  • " *.py" is smallest, containing 13.17% of code.


*.cpp817 LOC (48%) 11 files
*.java345 LOC (20%) 6 files
*.cs302 LOC (17%) 5 files
*.py222 LOC (13%) 8 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
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 ".*[.]sh".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]dockerfile".
  • 20 files match defined criteria (1,551 lines of code, 4.5% vs. main code):
    • 10 *.dockerfile files (789 lines of code)
    • 6 *.sh files (474 lines of code)
    • 3 *.bat files (168 lines of code)
    • 1 *.gradle files (120 lines of code)
  • " *.dockerfile" is biggest, containing 50.87% of code.
  • " *.gradle" is smallest, containing 7.74% of code.


*.dockerfile789 LOC (50%) 10 files
*.sh474 LOC (30%) 6 files
*.bat168 LOC (10%) 3 files
*.gradle120 LOC (7%) 1 files
Other Code
xsd
csproj
in
properties
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 ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[Ss]amples/.*".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 124 files match defined criteria (19,995 lines of code, 57.4% vs. main code):
    • 59 *.py files (10,976 lines of code)
    • 37 *.xml files (4,045 lines of code)
    • 5 *.xsd files (3,941 lines of code)
    • 16 *.md files (615 lines of code)
    • 2 *.cs files (99 lines of code)
    • 1 *.java files (91 lines of code)
    • 1 *.csproj files (90 lines of code)
    • 1 *.cpp files (81 lines of code)
    • 1 *.in files (55 lines of code)
    • 1 *.properties files (2 lines of code)
  • " *.py" is biggest, containing 54.89% of code.
  • " *.properties" is smallest, containing 0.01% of code.


*.py10976 LOC (54%) 59 files
*.xml4045 LOC (20%) 37 files
*.xsd3941 LOC (19%) 5 files
*.md615 LOC (3%) 16 files
*.cs99 LOC (<1%) 2 files
*.java91 LOC (<1%) 1 files
*.csproj90 LOC (<1%) 1 files
*.cpp81 LOC (<1%) 1 files
*.in55 LOC (<1%) 1 files
*.properties2 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.java files are analyzed with JavaAnalyzer:
    • 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 package names)
  • *.in files are analyzed with RustAnalyzer:
    • 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
    • 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
  • *.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
  • *.i 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
  • *.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
  • *.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
  • *.fsh 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
  • *.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
  • *.vsh 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
  • *.html files are analyzed with HtmlAnalyzer:
    • 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
  • *.c files are analyzed with CStyleAnalyzer:
    • 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
    • No dependency analysis
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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:37