aws / aws-sam-cli
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
csproj
mod
cfg
properties
npmignore
spec
ini
in
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.

main42655 LOC (22%) 524 files
test131089 LOC (70%) 1,083 files
generated17 LOC (<1%) 1 file
build and deployment423 LOC (<1%) 6 files
other13039 LOC (6%) 146 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
spec
in
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 524 files match defined criteria (42,655 LOC, 100.0% vs. main code):
    • 500 *.py files (41,532 LOC)
    • 8 *.yaml files (653 LOC)
    • 1 *.ps1 files (142 LOC)
    • 4 *.java files (106 LOC)
    • 2 *.spec files (71 LOC)
    • 1 *.cs files (37 LOC)
    • 1 *.go files (37 LOC)
    • 1 *.toml files (37 LOC)
    • 1 *.js files (15 LOC)
    • 1 *.in files (10 LOC)
    • 1 *.rb files (9 LOC)
    • 3 *.cfg files (6 LOC)
  • " *.py" is biggest, containing 97.37% of LOC.
  • " *.cfg" is smallest, containing 0.01% of LOC.


*.py41532 LOC (97%) 500 files
*.yaml653 LOC (1%) 8 files
*.ps1142 LOC (<1%) 1 file
*.java106 LOC (<1%) 4 files
*.spec71 LOC (<1%) 2 files
*.cs37 LOC (<1%) 1 file
*.go37 LOC (<1%) 1 file
*.toml37 LOC (<1%) 1 file
*.js15 LOC (<1%) 1 file
*.in10 LOC (<1%) 1 file
*.rb9 LOC (<1%) 1 file
*.cfg6 LOC (<1%) 3 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/jest[.][a-zA-Z0-9\.]+".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*[.][Tt]est[.].*".
    • files with paths like ".*[.]test[.].*".
    • files with paths like ".*[.][Tt]est/.*".
    • files with paths like ".*[.][Tt]ests[.].*".
  • 1083 files match defined criteria (131,089 LOC, 307.3% vs. main code):
    • 569 *.py files (103,216 LOC)
    • 506 *.yaml files (27,576 LOC)
    • 1 *.rb files (89 LOC)
    • 1 *.go files (51 LOC)
    • 1 *.cs files (49 LOC)
    • 2 *.java files (38 LOC)
    • 1 *.sh files (37 LOC)
    • 1 *.csproj files (17 LOC)
    • 1 *.js files (16 LOC)
  • " *.py" is biggest, containing 78.74% of LOC.
  • " *.js" is smallest, containing 0.01% of LOC.


*.py103216 LOC (78%) 569 files
*.yaml27576 LOC (21%) 506 files
*.rb89 LOC (<1%) 1 file
*.go51 LOC (<1%) 1 file
*.cs49 LOC (<1%) 1 file
*.java38 LOC (<1%) 2 files
*.sh37 LOC (<1%) 1 file
*.csproj17 LOC (<1%) 1 file
*.js16 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 ".*_generated[.][a-z]+".
  • 1 file matches defined criteria (17 LOC, 0.0% vs. main code). All matches are in *.yaml files.


*.yaml17 LOC (100%) 1 file
Build and Deployment Code
Source code used to configure or support build and deployment process.
csproj
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*/package[.]json".
    • files with paths like ".*[.]csproj".
    • files with paths like ".*/pom[.]xml".
    • files with paths like ".*[.]gradle".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 6 files match defined criteria (423 LOC, 1.0% vs. main code):
    • 2 *.sh files (295 LOC)
    • 1 *.bat files (61 LOC)
    • 1 *.xml files (45 LOC)
    • 1 *.csproj files (12 LOC)
    • 1 *.gradle files (10 LOC)
  • " *.sh" is biggest, containing 69.74% of LOC.
  • " *.gradle" is smallest, containing 2.36% of LOC.


*.sh295 LOC (69%) 2 files
*.bat61 LOC (14%) 1 file
*.xml45 LOC (10%) 1 file
*.csproj12 LOC (2%) 1 file
*.gradle10 LOC (2%) 1 file
Other Code
txt
ini
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 ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]properties".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[.]npmignore".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
  • 146 files match defined criteria (13,039 LOC, 30.6% vs. main code):
    • 95 *.json files (5,373 LOC)
    • 38 *.md files (4,091 LOC)
    • 9 *.txt files (3,286 LOC)
    • 1 *.rst files (218 LOC)
    • 2 *.ini files (69 LOC)
    • 1 *.mod files (2 LOC)
  • " *.json" is biggest, containing 41.21% of LOC.
  • " *.mod" is smallest, containing 0.02% of LOC.


*.json5373 LOC (41%) 95 files
*.md4091 LOC (31%) 38 files
*.txt3286 LOC (25%) 9 files
*.rst218 LOC (1%) 1 file
*.ini69 LOC (<1%) 2 files
*.mod2 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-03 23:07