elastic / python-elastic-agent-client
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
pyi
txt
ini
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.

main669 LOC (18%) 15 files
test666 LOC (18%) 6 files
generated1113 LOC (30%) 8 files
build and deployment33 LOC (<1%) 1 file
other1165 LOC (31%) 10 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 15 files match defined criteria (669 LOC, 100.0% vs. main code):
    • 13 *.py files (569 LOC)
    • 1 *.toml files (81 LOC)
    • 1 *.yaml files (19 LOC)
  • " *.py" is biggest, containing 85.05% of LOC.
  • " *.yaml" is smallest, containing 2.84% of LOC.


*.py569 LOC (85%) 13 files
*.toml81 LOC (12%) 1 file
*.yaml19 LOC (2%) 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 ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
  • 6 files match defined criteria (666 LOC, 99.6% vs. main code). All matches are in *.py files.


*.py666 LOC (100%) 6 files
Generated Code
Automatically generated files, not manually changed after generation.
pyi
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/generated/.*".
    • files with paths like ".*[.](py|java|h|cc|cpp|m|rb|php)" AND any line of content like ".*Generated by the protocol buffer compiler[.][ ]+DO NOT EDIT[!].*".
  • 8 files match defined criteria (1,113 LOC, 166.4% vs. main code):
    • 5 *.py files (571 LOC)
    • 3 *.pyi files (542 LOC)
  • " *.py" is biggest, containing 51.3% of LOC.
  • " *.pyi" is smallest, containing 48.7% of LOC.


*.py571 LOC (51%) 5 files
*.pyi542 LOC (48%) 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 1 file matches defined criteria (33 LOC, 4.9% vs. main code). All matches are in *.sh files.


*.sh33 LOC (100%) 1 file
Other Code
txt
ini
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]txt".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
  • 10 files match defined criteria (1,165 LOC, 174.1% vs. main code):
    • 2 *.txt files (920 LOC)
    • 3 *.py files (119 LOC)
    • 2 *.md files (91 LOC)
    • 2 *.json files (33 LOC)
    • 1 *.ini files (2 LOC)
  • " *.txt" is biggest, containing 78.97% of LOC.
  • " *.ini" is smallest, containing 0.17% of LOC.


*.txt920 LOC (78%) 2 files
*.py119 LOC (10%) 3 files
*.md91 LOC (7%) 2 files
*.json33 LOC (2%) 2 files
*.ini2 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-13 20:05