GoogleCloudPlatform / kotlin-samples
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
cmd
proto
editorconfig
gitattributes
txt
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.

main2157 LOC (39%) 81 files
test367 LOC (6%) 10 files
generated0 LOC (0%) 0 files
build and deployment1720 LOC (31%) 21 files
other1286 LOC (23%) 48 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 ".*".
  • 81 files match defined criteria (2,157 LOC, 100.0% vs. main code):
    • 24 *.kt files (1,036 LOC)
    • 31 *.kts files (736 LOC)
    • 18 *.xml files (257 LOC)
    • 4 *.proto files (116 LOC)
    • 3 *.toml files (8 LOC)
    • 1 *.sql files (4 LOC)
  • " *.kt" is biggest, containing 48.03% of LOC.
  • " *.sql" is smallest, containing 0.19% of LOC.


*.kt1036 LOC (48%) 24 files
*.kts736 LOC (34%) 31 files
*.xml257 LOC (11%) 18 files
*.proto116 LOC (5%) 4 files
*.toml8 LOC (<1%) 3 files
*.sql4 LOC (<1%) 1 file
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/.*".
  • 10 files match defined criteria (367 LOC, 17.0% vs. main code). All matches are in *.kt files.


*.kt367 LOC (100%) 10 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 ".*[.]bat".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/AndroidManifest[.]xml".
    • files with paths like ".*/[.]gitattributes".
  • 21 files match defined criteria (1,720 LOC, 79.7% vs. main code):
    • 15 *.bat files (1,065 LOC)
    • 6 *.xml files (655 LOC)
  • " *.bat" is biggest, containing 61.92% of LOC.
  • " *.xml" is smallest, containing 38.08% of LOC.


*.bat1065 LOC (61%) 15 files
*.xml655 LOC (38%) 6 files
Other Code
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
  • 48 files match defined criteria (1,286 LOC, 59.6% vs. main code):
    • 27 *.md files (870 LOC)
    • 8 *.kt files (334 LOC)
    • 11 *.properties files (72 LOC)
    • 2 *.json files (10 LOC)
  • " *.md" is biggest, containing 67.65% of LOC.
  • " *.json" is smallest, containing 0.78% of LOC.


*.md870 LOC (67%) 27 files
*.kt334 LOC (25%) 8 files
*.properties72 LOC (5%) 11 files
*.json10 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:41