anthropics / anthropic-sdk-ruby
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
rbi
  • 9 extensions are included in analyses: rb, rbi, yaml, md, gitignore, json, txt, sh, gemspec
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.

main93572 LOC (85%) 1,911 files
test12228 LOC (11%) 68 files
generated0 LOC (0%) 0 files
build and deployment124 LOC (<1%) 4 files
other2945 LOC (2%) 42 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
rbi
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 1911 files match defined criteria (93,572 LOC, 100.0% vs. main code):
    • 955 *.rbi files (70,948 LOC)
    • 955 *.rb files (22,607 LOC)
    • 1 *.yaml files (17 LOC)
  • " *.rbi" is biggest, containing 75.82% of LOC.
  • " *.yaml" is smallest, containing 0.02% of LOC.


*.rbi70948 LOC (75%) 955 files
*.rb22607 LOC (24%) 955 files
*.yaml17 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 ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
  • 68 files match defined criteria (12,228 LOC, 13.1% vs. main code). All matches are in *.rb files.


*.rb12228 LOC (100%) 68 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 ".*[.]gemspec".
    • files with paths like ".*[.]sh".
  • 4 files match defined criteria (124 LOC, 0.1% vs. main code):
    • 1 *.sh files (84 LOC)
    • 1 *.gemspec files (27 LOC)
    • 2 *.gitignore files (13 LOC)
  • " *.sh" is biggest, containing 67.74% of LOC.
  • " *.gitignore" is smallest, containing 10.48% of LOC.


*.sh84 LOC (67%) 1 file
*.gemspec27 LOC (21%) 1 file
*.gitignore13 LOC (10%) 2 files
Other Code
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/.*".
  • 42 files match defined criteria (2,945 LOC, 3.1% vs. main code):
    • 6 *.md files (1,545 LOC)
    • 34 *.rb files (1,327 LOC)
    • 2 *.json files (73 LOC)
  • " *.md" is biggest, containing 52.46% of LOC.
  • " *.json" is smallest, containing 2.48% of LOC.


*.md1545 LOC (52%) 6 files
*.rb1327 LOC (45%) 34 files
*.json73 LOC (2%) 2 files
Analyzers
Info about analyzers used for source code examinations.
  • *.rbi files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic dependency analysis
  • *.rb files are analyzed with RubyAnalyzer:
    • 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
    • Basic heuristic 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


2026-06-24 10:45