aws / amazon-cloudwatch-agent-test
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
tpl
mod
txt
wxs
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.

main16325 LOC (44%) 187 files
test11848 LOC (32%) 149 files
generated0 LOC (0%) 0 files
build and deployment76 LOC (<1%) 4 files
other8351 LOC (22%) 174 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
tpl
wxs
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 187 files match defined criteria (16,325 LOC, 100.0% vs. main code):
    • 122 *.tf files (11,078 LOC)
    • 47 *.go files (4,465 LOC)
    • 6 *.yaml files (354 LOC)
    • 9 *.tpl files (237 LOC)
    • 1 *.wxs files (171 LOC)
    • 2 *.ps1 files (20 LOC)
  • " *.tf" is biggest, containing 67.86% of LOC.
  • " *.ps1" is smallest, containing 0.12% of LOC.


*.tf11078 LOC (67%) 122 files
*.go4465 LOC (27%) 47 files
*.yaml354 LOC (2%) 6 files
*.tpl237 LOC (1%) 9 files
*.wxs171 LOC (1%) 1 file
*.ps120 LOC (<1%) 2 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
  • 149 files match defined criteria (11,848 LOC, 72.6% vs. main code):
    • 122 *.go files (10,631 LOC)
    • 8 *.yaml files (396 LOC)
    • 6 *.tpl files (318 LOC)
    • 3 *.tf files (306 LOC)
    • 2 *.ps1 files (92 LOC)
    • 4 *.sh files (86 LOC)
    • 1 *.py files (13 LOC)
    • 3 *.toml files (6 LOC)
  • " *.go" is biggest, containing 89.73% of LOC.
  • " *.toml" is smallest, containing 0.05% of LOC.


*.go10631 LOC (89%) 122 files
*.yaml396 LOC (3%) 8 files
*.tpl318 LOC (2%) 6 files
*.tf306 LOC (2%) 3 files
*.ps192 LOC (<1%) 2 files
*.sh86 LOC (<1%) 4 files
*.py13 LOC (<1%) 1 file
*.toml6 LOC (<1%) 3 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 4 files match defined criteria (76 LOC, 0.5% vs. main code). All matches are in *.sh files.


*.sh76 LOC (100%) 4 files
Other Code
mod
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 ".*/go[.]mod".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
  • 174 files match defined criteria (8,351 LOC, 51.2% vs. main code):
    • 166 *.json files (8,123 LOC)
    • 2 *.mod files (118 LOC)
    • 6 *.md files (110 LOC)
  • " *.json" is biggest, containing 97.27% of LOC.
  • " *.md" is smallest, containing 1.32% of LOC.


*.json8123 LOC (97%) 166 files
*.mod118 LOC (1%) 2 files
*.md110 LOC (1%) 6 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 00:46