microsoft / thrifty
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
properties
g4
txt
  • 13 extensions are included in analyses: kt, java, gradle, thrift, md, properties, gitignore, yml, g4, txt, bat, sh, json
  • 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 ".*/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) (0 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.

main13168 LOC (24%) 122 files
test40102 LOC (73%) 106 files
generated0 LOC (0%) 0 files
build and deployment502 LOC (<1%) 15 files
other759 LOC (1%) 20 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
g4
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 122 files match defined criteria (13,168 lines of code, 100.0% vs. main code):
    • 103 *.kt files (11,889 lines of code)
    • 16 *.java files (825 lines of code)
    • 1 *.g4 files (237 lines of code)
    • 2 *.thrift files (217 lines of code)
  • " *.kt" is biggest, containing 90.29% of code.
  • " *.thrift" is smallest, containing 1.65% of code.


*.kt11889 LOC (90%) 103 files
*.java825 LOC (6%) 16 files
*.g4237 LOC (1%) 1 files
*.thrift217 LOC (1%) 2 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]est/.*".
    • files with paths like ".*[-]tests/.*".
    • files with paths like ".*[-]test[-].*".
    • files with any line of content like ".*/simpletest/.*".
  • 106 files match defined criteria (40,102 lines of code, 304.5% vs. main code):
    • 50 *.java files (33,958 lines of code)
    • 28 *.kt files (5,149 lines of code)
    • 17 *.thrift files (812 lines of code)
    • 11 *.gradle files (183 lines of code)
  • " *.java" is biggest, containing 84.68% of code.
  • " *.gradle" is smallest, containing 0.46% of code.


*.java33958 LOC (84%) 50 files
*.kt5149 LOC (12%) 28 files
*.thrift812 LOC (2%) 17 files
*.gradle183 LOC (<1%) 11 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 ".*/[.]gitignore".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]sh".
  • 15 files match defined criteria (502 lines of code, 3.8% vs. main code):
    • 13 *.gradle files (427 lines of code)
    • 1 *.bat files (68 lines of code)
    • 1 *.sh files (7 lines of code)
  • " *.gradle" is biggest, containing 85.06% of code.
  • " *.sh" is smallest, containing 1.39% of code.


*.gradle427 LOC (85%) 13 files
*.bat68 LOC (13%) 1 files
*.sh7 LOC (1%) 1 files
Other Code
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 ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]txt".
  • 20 files match defined criteria (759 lines of code, 5.8% vs. main code):
    • 12 *.md files (721 lines of code)
    • 8 *.properties files (38 lines of code)
  • " *.md" is biggest, containing 94.99% of code.
  • " *.properties" is smallest, containing 5.01% of code.


*.md721 LOC (94%) 12 files
*.properties38 LOC (5%) 8 files
Analyzers
Info about analyzers used for source code examinations.
  • *.kt files are analyzed with KotlinAnalyzer:
    • 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 (based on imports and package statements)
  • *.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)
  • *.g4 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
  • *.thrift files are analyzed with ThriftAnalyzer:
    • 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:28