aws / telegraf
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
proto
mod
gitattributes
plist
rl
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.

main155033 LOC (46%) 915 files
test141344 LOC (42%) 493 files
generated0 LOC (0%) 0 files
build and deployment892 LOC (<1%) 22 files
other38681 LOC (11%) 346 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
rl
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 915 files match defined criteria (155,033 LOC, 100.0% vs. main code):
    • 894 *.go files (153,724 LOC)
    • 1 *.rl files (453 LOC)
    • 5 *.proto files (349 LOC)
    • 2 *.c files (245 LOC)
    • 7 *.xml files (110 LOC)
    • 3 *.h files (79 LOC)
    • 1 *.yaml files (43 LOC)
    • 1 *.ps1 files (24 LOC)
    • 1 *.sql files (6 LOC)
  • " *.go" is biggest, containing 99.16% of LOC.
  • " *.sql" is smallest, containing 0% of LOC.


*.go153724 LOC (99%) 894 files
*.rl453 LOC (<1%) 1 file
*.proto349 LOC (<1%) 5 files
*.c245 LOC (<1%) 2 files
*.xml110 LOC (<1%) 7 files
*.h79 LOC (<1%) 3 files
*.yaml43 LOC (<1%) 1 file
*.ps124 LOC (<1%) 1 file
*.sql6 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 ".*/mock[a-zA-Z0-9_\- ]+/.*".
    • files with paths like ".*/[Mm]ocks/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*/test[.].*".
  • 493 files match defined criteria (141,344 LOC, 91.2% vs. main code):
    • 491 *.go files (141,301 LOC)
    • 1 *.xml files (41 LOC)
    • 1 *.sh files (2 LOC)
  • " *.go" is biggest, containing 99.97% of LOC.
  • " *.sh" is smallest, containing 0% of LOC.


*.go141301 LOC (99%) 491 files
*.xml41 LOC (<1%) 1 file
*.sh2 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 ".*[.]sh".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
  • 22 files match defined criteria (892 LOC, 0.6% vs. main code). All matches are in *.sh files.


*.sh892 LOC (100%) 22 files
Other Code
txt
mod
plist
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 ".*[.]plist".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/go[.]mod".
    • files with paths like ".*/[Ee]xamples/.*".
  • 346 files match defined criteria (38,681 LOC, 25.0% vs. main code):
    • 323 *.md files (31,478 LOC)
    • 10 *.json files (6,173 LOC)
    • 2 *.txt files (475 LOC)
    • 2 *.mod files (426 LOC)
    • 4 *.rb files (53 LOC)
    • 1 *.rst files (34 LOC)
    • 1 *.go files (17 LOC)
    • 1 *.plist files (16 LOC)
    • 2 *.sh files (9 LOC)
  • " *.md" is biggest, containing 81.38% of LOC.
  • " *.sh" is smallest, containing 0.02% of LOC.


*.md31478 LOC (81%) 323 files
*.json6173 LOC (15%) 10 files
*.txt475 LOC (1%) 2 files
*.mod426 LOC (1%) 2 files
*.rb53 LOC (<1%) 4 files
*.rst34 LOC (<1%) 1 file
*.go17 LOC (<1%) 1 file
*.plist16 LOC (<1%) 1 file
*.sh9 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-04 00:06