GoogleCloudPlatform / nodejs-docs-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
cfg
txt
proto
srt
njk
jsonc
mjs
eslintignore
properties
prettierignore
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.

main56391 LOC (55%) 1,397 files
test36064 LOC (35%) 637 files
generated0 LOC (0%) 0 files
build and deployment221 LOC (<1%) 9 files
other9189 LOC (9%) 321 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1397 files match defined criteria (56,391 LOC, 100.0% vs. main code):
    • 1,286 *.js files (52,805 LOC)
    • 68 *.yaml files (992 LOC)
    • 10 *.proto files (987 LOC)
    • 10 *.html files (700 LOC)
    • 11 *.pug files (423 LOC)
    • 6 *.ts files (198 LOC)
    • 4 *.css files (139 LOC)
    • 1 *.py files (108 LOC)
    • 1 *.mjs files (39 LOC)
  • " *.js" is biggest, containing 93.64% of LOC.
  • " *.mjs" is smallest, containing 0.07% of LOC.


*.js52805 LOC (93%) 1,286 files
*.yaml992 LOC (1%) 68 files
*.proto987 LOC (1%) 10 files
*.html700 LOC (1%) 10 files
*.pug423 LOC (<1%) 11 files
*.ts198 LOC (<1%) 6 files
*.css139 LOC (<1%) 4 files
*.py108 LOC (<1%) 1 file
*.mjs39 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
mjs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*[-]test[-].*".
  • 637 files match defined criteria (36,064 LOC, 64.0% vs. main code):
    • 590 *.js files (34,832 LOC)
    • 22 *.yaml files (638 LOC)
    • 20 *.sh files (474 LOC)
    • 4 *.ts files (70 LOC)
    • 1 *.mjs files (50 LOC)
  • " *.js" is biggest, containing 96.58% of LOC.
  • " *.mjs" is smallest, containing 0.14% of LOC.


*.js34832 LOC (96%) 590 files
*.yaml638 LOC (1%) 22 files
*.sh474 LOC (1%) 20 files
*.ts70 LOC (<1%) 4 files
*.mjs50 LOC (<1%) 1 file
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[.]json".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/docker[-]compose[.]yaml".
  • 9 files match defined criteria (221 LOC, 0.4% vs. main code):
    • 8 *.sh files (203 LOC)
    • 1 *.yaml files (18 LOC)
  • " *.sh" is biggest, containing 91.86% of LOC.
  • " *.yaml" is smallest, containing 8.14% of LOC.


*.sh203 LOC (91%) 8 files
*.yaml18 LOC (8%) 1 file
Other Code
txt
properties
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 ".*/[.]prettierignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/[.]eslintignore".
  • 321 files match defined criteria (9,189 LOC, 16.3% vs. main code):
    • 212 *.json files (5,428 LOC)
    • 90 *.md files (3,735 LOC)
    • 14 *.txt files (18 LOC)
    • 4 *.svg files (4 LOC)
    • 1 *.properties files (4 LOC)
  • " *.json" is biggest, containing 59.07% of LOC.
  • " *.properties" is smallest, containing 0.04% of LOC.


*.json5428 LOC (59%) 212 files
*.md3735 LOC (40%) 90 files
*.txt18 LOC (<1%) 14 files
*.svg4 LOC (<1%) 4 files
*.properties4 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 14:22