bazelbuild / rules_kotlin
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
proto
editorconfig
  • 17 extensions are included in analyses: kt, bzl, xml, java, md, txt, json, proto, sh, gitignore, py, bat, MD, yml, editorconfig, yaml, gradle
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/(3rd|[Tt]hird)[-_]?[Pp]arty/.*" (Dependencies) (1 file).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (5 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) (5 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.

main8868 LOC (23%) 107 files
test3872 LOC (10%) 48 files
generated0 LOC (0%) 0 files
build and deployment60 LOC (<1%) 3 files
other25714 LOC (66%) 122 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 107 files match defined criteria (8,868 lines of code, 100.0% vs. main code):
    • 52 *.bzl files (5,263 lines of code)
    • 49 *.kt files (3,224 lines of code)
    • 3 *.proto files (277 lines of code)
    • 2 *.java files (59 lines of code)
    • 1 *.py files (45 lines of code)
  • " *.bzl" is biggest, containing 59.35% of code.
  • " *.py" is smallest, containing 0.51% of code.


*.bzl5263 LOC (59%) 52 files
*.kt3224 LOC (36%) 49 files
*.proto277 LOC (3%) 3 files
*.java59 LOC (<1%) 2 files
*.py45 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 ".*/src/androidTest/.*".
    • files with paths like ".*_tests[.].*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 48 files match defined criteria (3,872 lines of code, 43.7% vs. main code):
    • 27 *.kt files (2,574 lines of code)
    • 19 *.java files (1,170 lines of code)
    • 2 *.bzl files (128 lines of code)
  • " *.kt" is biggest, containing 66.48% of code.
  • " *.bzl" is smallest, containing 3.31% of code.


*.kt2574 LOC (66%) 27 files
*.java1170 LOC (30%) 19 files
*.bzl128 LOC (3%) 2 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 ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*/AndroidManifest[.]xml".
  • 3 files match defined criteria (60 lines of code, 0.7% vs. main code):
    • 2 *.sh files (46 lines of code)
    • 1 *.bat files (14 lines of code)
  • " *.sh" is biggest, containing 76.67% of code.
  • " *.bat" is smallest, containing 23.33% of code.


*.sh46 LOC (76%) 2 files
*.bat14 LOC (23%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](xml|xsd|robot|sql|pgsql|dashboard|profile|ipynb|raml|avsc|al)".
  • 122 files match defined criteria (25,714 lines of code, 290.0% vs. main code):
    • 71 *.kt files (24,706 lines of code)
    • 10 *.md files (477 lines of code)
    • 32 *.xml files (415 lines of code)
    • 6 *.java files (53 lines of code)
    • 1 *.gradle files (48 lines of code)
    • 2 *.json files (15 lines of code)
  • " *.kt" is biggest, containing 96.08% of code.
  • " *.json" is smallest, containing 0.06% of code.


*.kt24706 LOC (96%) 71 files
*.md477 LOC (1%) 10 files
*.xml415 LOC (1%) 32 files
*.java53 LOC (<1%) 6 files
*.gradle48 LOC (<1%) 1 files
*.json15 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.bzl 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
  • *.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)
  • *.proto 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
  • *.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)
  • *.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


2022-02-03 05:32