anthropics / connect-rust
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
proto
mod
gitattributes
  • 15 extensions are included in analyses: rs, yaml, toml, proto, md, sh, go, svg, gitignore, py, mod, gitattributes, dockerignore, txt, json
  • 4 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (22 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (2 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
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.

main29347 LOC (22%) 74 files
test1353 LOC (1%) 4 files
generated75870 LOC (58%) 94 files
build and deployment858 LOC (<1%) 16 files
other22449 LOC (17%) 91 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 74 files match defined criteria (29,347 LOC, 100.0% vs. main code):
    • 44 *.rs files (27,690 LOC)
    • 17 *.yaml files (647 LOC)
    • 8 *.proto files (463 LOC)
    • 2 *.py files (372 LOC)
    • 2 *.go files (174 LOC)
    • 1 *.toml files (1 LOC)
  • " *.rs" is biggest, containing 94.35% of LOC.
  • " *.toml" is smallest, containing 0% of LOC.


*.rs27690 LOC (94%) 44 files
*.yaml647 LOC (2%) 17 files
*.proto463 LOC (1%) 8 files
*.py372 LOC (1%) 2 files
*.go174 LOC (<1%) 2 files
*.toml1 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Ss]pecs/.*".
    • files with paths like ".*/test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
  • 4 files match defined criteria (1,353 LOC, 4.6% vs. main code):
    • 2 *.rs files (1,300 LOC)
    • 1 *.toml files (28 LOC)
    • 1 *.proto files (25 LOC)
  • " *.rs" is biggest, containing 96.08% of LOC.
  • " *.proto" is smallest, containing 1.85% of LOC.


*.rs1300 LOC (96%) 2 files
*.toml28 LOC (2%) 1 file
*.proto25 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/.*".
    • files with paths like ".*/gen/.*[.]go".
  • 94 files match defined criteria (75,870 LOC, 258.5% vs. main code):
    • 90 *.rs files (74,701 LOC)
    • 4 *.go files (1,169 LOC)
  • " *.rs" is biggest, containing 98.46% of LOC.
  • " *.go" is smallest, containing 1.54% of LOC.


*.rs74701 LOC (98%) 90 files
*.go1169 LOC (1%) 4 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
mod
gitattributes
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*/Cargo[.]toml".
    • files with paths like ".*/[.]github/workflows/.*[.]ya?ml".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like "(.*/)?[.]dockerignore".
    • files with paths like ".*/go[.]mod".
  • 16 files match defined criteria (858 LOC, 2.9% vs. main code):
    • 9 *.toml files (499 LOC)
    • 2 *.sh files (268 LOC)
    • 1 *.yaml files (53 LOC)
    • 1 *.gitignore files (19 LOC)
    • 1 *.mod files (11 LOC)
    • 1 *.gitattributes files (5 LOC)
    • 1 *.dockerignore files (3 LOC)
  • " *.toml" is biggest, containing 58.16% of LOC.
  • " *.dockerignore" is smallest, containing 0.35% of LOC.


*.toml499 LOC (58%) 9 files
*.sh268 LOC (31%) 2 files
*.yaml53 LOC (6%) 1 file
*.gitignore19 LOC (2%) 1 file
*.mod11 LOC (1%) 1 file
*.gitattributes5 LOC (<1%) 1 file
*.dockerignore3 LOC (<1%) 1 file
Other Code
proto
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*[.]json".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]svg".
  • 91 files match defined criteria (22,449 LOC, 76.5% vs. main code):
    • 47 *.rs files (18,945 LOC)
    • 14 *.md files (2,597 LOC)
    • 8 *.proto files (277 LOC)
    • 7 *.toml files (268 LOC)
    • 5 *.sh files (162 LOC)
    • 3 *.svg files (140 LOC)
    • 5 *.yaml files (48 LOC)
    • 1 *.gitignore files (9 LOC)
    • 1 *.json files (3 LOC)
  • " *.rs" is biggest, containing 84.39% of LOC.
  • " *.json" is smallest, containing 0.01% of LOC.


*.rs18945 LOC (84%) 47 files
*.md2597 LOC (11%) 14 files
*.proto277 LOC (1%) 8 files
*.toml268 LOC (1%) 7 files
*.sh162 LOC (<1%) 5 files
*.svg140 LOC (<1%) 3 files
*.yaml48 LOC (<1%) 5 files
*.gitignore9 LOC (<1%) 1 file
*.json3 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.
  • *.rs files are analyzed with RustAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.yaml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.proto files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.py files are analyzed with PythonAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis
  • *.go files are analyzed with GoLangAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis
  • *.toml files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2026-06-24 10:48