aws / amazon-ecs-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
mod
spec
tpl
txt
proto
gitmodules
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.

main92216 LOC (41%) 802 files
test113973 LOC (51%) 473 files
generated101 LOC (<1%) 1 file
build and deployment1243 LOC (<1%) 17 files
other14840 LOC (6%) 33 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
spec
proto
tpl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 802 files match defined criteria (92,216 LOC, 100.0% vs. main code):
    • 781 *.go files (90,055 LOC)
    • 3 *.spec files (1,363 LOC)
    • 13 *.ps1 files (661 LOC)
    • 1 *.proto files (81 LOC)
    • 1 *.c files (29 LOC)
    • 1 *.xml files (11 LOC)
    • 1 *.yaml files (10 LOC)
    • 1 *.tpl files (6 LOC)
  • " *.go" is biggest, containing 97.66% of LOC.
  • " *.tpl" is smallest, containing 0.01% of LOC.


*.go90055 LOC (97%) 781 files
*.spec1363 LOC (1%) 3 files
*.ps1661 LOC (<1%) 13 files
*.proto81 LOC (<1%) 1 file
*.c29 LOC (<1%) 1 file
*.xml11 LOC (<1%) 1 file
*.yaml10 LOC (<1%) 1 file
*.tpl6 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 ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_mock[.][a-zA-Z0-9_\-]+".
    • files with paths like ".*[-]test[-].*".
    • files with paths like ".*/[Tt]est/.*".
  • 473 files match defined criteria (113,973 LOC, 123.6% vs. main code):
    • 459 *.go files (113,719 LOC)
    • 13 *.dockerfile files (231 LOC)
    • 1 *.ps1 files (23 LOC)
  • " *.go" is biggest, containing 99.78% of LOC.
  • " *.ps1" is smallest, containing 0.02% of LOC.


*.go113719 LOC (99%) 459 files
*.dockerfile231 LOC (<1%) 13 files
*.ps123 LOC (<1%) 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 ".*/gen/.*[.]go".
  • 1 file matches defined criteria (101 LOC, 0.1% vs. main code). All matches are in *.go files.


*.go101 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 ".*[.]sh".
    • files with paths like ".*[.]dockerfile".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitmodules".
  • 17 files match defined criteria (1,243 LOC, 1.3% vs. main code):
    • 9 *.sh files (1,105 LOC)
    • 8 *.dockerfile files (138 LOC)
  • " *.sh" is biggest, containing 88.9% of LOC.
  • " *.dockerfile" is smallest, containing 11.1% of LOC.


*.sh1105 LOC (88%) 9 files
*.dockerfile138 LOC (11%) 8 files
Other Code
mod
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 ".*/go[.]mod".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]dockerignore".
  • 33 files match defined criteria (14,840 LOC, 16.1% vs. main code):
    • 16 *.md files (12,715 LOC)
    • 10 *.json files (1,817 LOC)
    • 7 *.mod files (308 LOC)
  • " *.md" is biggest, containing 85.68% of LOC.
  • " *.mod" is smallest, containing 2.08% of LOC.


*.md12715 LOC (85%) 16 files
*.json1817 LOC (12%) 10 files
*.mod308 LOC (2%) 7 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-03 20:41