GoogleCloudPlatform / apigee-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
feature
properties
txt
mod
xsl
editorconfig
proto
eslintignore
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.

main8440 LOC (3%) 323 files
test1285 LOC (<1%) 57 files
generated108337 LOC (45%) 21 files
build and deployment4747 LOC (2%) 122 files
other112773 LOC (47%) 121 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
xsl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 323 files match defined criteria (8,440 LOC, 100.0% vs. main code):
    • 288 *.xml files (4,735 LOC)
    • 7 *.ipynb files (2,184 LOC)
    • 10 *.yaml files (791 LOC)
    • 3 *.java files (304 LOC)
    • 9 *.js files (270 LOC)
    • 4 *.go files (113 LOC)
    • 1 *.proto files (29 LOC)
    • 1 *.xsl files (14 LOC)
  • " *.xml" is biggest, containing 56.1% of LOC.
  • " *.xsl" is smallest, containing 0.17% of LOC.


*.xml4735 LOC (56%) 288 files
*.ipynb2184 LOC (25%) 7 files
*.yaml791 LOC (9%) 10 files
*.java304 LOC (3%) 3 files
*.js270 LOC (3%) 9 files
*.go113 LOC (1%) 4 files
*.proto29 LOC (<1%) 1 file
*.xsl14 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
feature
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.]feature".
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
  • 57 files match defined criteria (1,285 LOC, 15.2% vs. main code):
    • 15 *.feature files (641 LOC)
    • 28 *.js files (279 LOC)
    • 13 *.xml files (237 LOC)
    • 1 *.yaml files (128 LOC)
  • " *.feature" is biggest, containing 49.88% of LOC.
  • " *.yaml" is smallest, containing 9.96% of LOC.


*.feature641 LOC (49%) 15 files
*.js279 LOC (21%) 28 files
*.xml237 LOC (18%) 13 files
*.yaml128 LOC (9%) 1 file
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/package[-]lock[.]json".
    • files with paths like ".*/generated/.*".
  • 21 files match defined criteria (108,337 LOC, 1283.6% vs. main code):
    • 19 *.json files (108,082 LOC)
    • 2 *.go files (255 LOC)
  • " *.json" is biggest, containing 99.76% of LOC.
  • " *.go" is smallest, containing 0.24% of LOC.


*.json108082 LOC (99%) 19 files
*.go255 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 ".*/package[-]lock[.]json".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/pom[.]xml".
  • 122 files match defined criteria (4,747 LOC, 56.2% vs. main code):
    • 116 *.sh files (3,916 LOC)
    • 6 *.xml files (831 LOC)
  • " *.sh" is biggest, containing 82.49% of LOC.
  • " *.xml" is smallest, containing 17.51% of LOC.


*.sh3916 LOC (82%) 116 files
*.xml831 LOC (17%) 6 files
Other Code
txt
mod
properties
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]properties".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]editorconfig".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[.]eslintignore".
  • 121 files match defined criteria (112,773 LOC, 1336.2% vs. main code):
    • 69 *.json files (108,973 LOC)
    • 44 *.md files (3,558 LOC)
    • 1 *.txt files (169 LOC)
    • 1 *.mod files (40 LOC)
    • 6 *.properties files (33 LOC)
  • " *.json" is biggest, containing 96.63% of LOC.
  • " *.properties" is smallest, containing 0.03% of LOC.


*.json108973 LOC (96%) 69 files
*.md3558 LOC (3%) 44 files
*.txt169 LOC (<1%) 1 file
*.mod40 LOC (<1%) 1 file
*.properties33 LOC (<1%) 6 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 15:53