GoogleCloudPlatform / cloud-spanner-emulator
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
po
spec
mk
ld
txt
in
cfg
l
proto
y
patch
s
xs
sed
man
proj
prolog
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.

main68838 LOC (48%) 442 files
test71927 LOC (50%) 221 files
generated0 LOC (0%) 0 files
build and deployment142 LOC (<1%) 6 files
other928 LOC (<1%) 9 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 442 files match defined criteria (68,838 LOC, 100.0% vs. main code):
    • 198 *.cc files (54,330 LOC)
    • 218 *.h files (12,642 LOC)
    • 3 *.proto files (1,040 LOC)
    • 3 *.go files (280 LOC)
    • 2 *.bzl files (277 LOC)
    • 15 *.cfg files (141 LOC)
    • 2 *.inc files (108 LOC)
    • 1 *.yaml files (20 LOC)
  • " *.cc" is biggest, containing 78.92% of LOC.
  • " *.yaml" is smallest, containing 0.03% of LOC.


*.cc54330 LOC (78%) 198 files
*.h12642 LOC (18%) 218 files
*.proto1040 LOC (1%) 3 files
*.go280 LOC (<1%) 3 files
*.bzl277 LOC (<1%) 2 files
*.cfg141 LOC (<1%) 15 files
*.inc108 LOC (<1%) 2 files
*.yaml20 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
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 paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*_tests[.].*".
  • 221 files match defined criteria (71,927 LOC, 104.5% vs. main code):
    • 194 *.cc files (69,147 LOC)
    • 15 *.h files (1,671 LOC)
    • 7 *.py files (754 LOC)
    • 3 *.sh files (263 LOC)
    • 2 *.proto files (92 LOC)
  • " *.cc" is biggest, containing 96.13% of LOC.
  • " *.proto" is smallest, containing 0.13% of LOC.


*.cc69147 LOC (96%) 194 files
*.h1671 LOC (2%) 15 files
*.py754 LOC (1%) 7 files
*.sh263 LOC (<1%) 3 files
*.proto92 LOC (<1%) 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]mk".
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]dockerfile".
  • 6 files match defined criteria (142 LOC, 0.2% vs. main code):
    • 4 *.sh files (73 LOC)
    • 1 *.dockerfile files (46 LOC)
    • 1 *.bat files (23 LOC)
  • " *.sh" is biggest, containing 51.41% of LOC.
  • " *.bat" is smallest, containing 16.2% of LOC.


*.sh73 LOC (51%) 4 files
*.dockerfile46 LOC (32%) 1 file
*.bat23 LOC (16%) 1 file
Other Code
patch
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 ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]po".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]patch".
    • files with paths like ".*/[.]dockerignore".
  • 9 files match defined criteria (928 LOC, 1.3% vs. main code):
    • 5 *.patch files (663 LOC)
    • 3 *.md files (228 LOC)
    • 1 *.json files (37 LOC)
  • " *.patch" is biggest, containing 71.44% of LOC.
  • " *.json" is smallest, containing 3.99% of LOC.


*.patch663 LOC (71%) 5 files
*.md228 LOC (24%) 3 files
*.json37 LOC (3%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:21