aws / amazon-cloudwatch-agent
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
txt
mod
spec
plist
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.

main70977 LOC (55%) 761 files
test46508 LOC (36%) 364 files
generated285 LOC (<1%) 1 file
build and deployment209 LOC (<1%) 4 files
other10586 LOC (8%) 179 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
spec
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 761 files match defined criteria (70,977 LOC, 100.0% vs. main code):
    • 657 *.go files (46,342 LOC)
    • 95 *.yaml files (24,020 LOC)
    • 3 *.ps1 files (440 LOC)
    • 1 *.spec files (91 LOC)
    • 4 *.toml files (83 LOC)
    • 1 *.dockerignore files (1 LOC)
  • " *.go" is biggest, containing 65.29% of LOC.
  • " *.dockerignore" is smallest, containing 0% of LOC.


*.go46342 LOC (65%) 657 files
*.yaml24020 LOC (33%) 95 files
*.ps1440 LOC (<1%) 3 files
*.spec91 LOC (<1%) 1 file
*.toml83 LOC (<1%) 4 files
*.dockerignore1 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 ".*_test[.].*".
    • files with paths like ".*/test_.*".
  • 364 files match defined criteria (46,508 LOC, 65.5% vs. main code). All matches are in *.go files.


*.go46508 LOC (100%) 364 files
Generated Code
Automatically generated files, not manually changed after generation.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with any line of content like "//[ ]*Generated by .*".
  • 1 file matches defined criteria (285 LOC, 0.4% vs. main code). All matches are in *.go files.


*.go285 LOC (100%) 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 4 files match defined criteria (209 LOC, 0.3% vs. main code). All matches are in *.sh files.


*.sh209 LOC (100%) 4 files
Other Code
mod
plist
txt
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 ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*[.]plist".
    • files with paths like ".*/[.]dockerignore".
  • 179 files match defined criteria (10,586 LOC, 14.9% vs. main code):
    • 154 *.json files (8,538 LOC)
    • 21 *.md files (1,407 LOC)
    • 2 *.mod files (600 LOC)
    • 1 *.plist files (23 LOC)
    • 1 *.txt files (18 LOC)
  • " *.json" is biggest, containing 80.65% of LOC.
  • " *.txt" is smallest, containing 0.17% of LOC.


*.json8538 LOC (80%) 154 files
*.md1407 LOC (13%) 21 files
*.mod600 LOC (5%) 2 files
*.plist23 LOC (<1%) 1 file
*.txt18 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 00:10