anthropics / buffa
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
pb
mod
gitattributes
  • 15 extensions are included in analyses: rs, proto, svg, md, toml, yaml, sh, json, txt, py, pb, gitignore, mod, gitattributes, go
  • 4 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/docs/.*" (Documentation) (11 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).
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (2 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.

main56137 LOC (45%) 192 files
test18980 LOC (15%) 83 files
generated18068 LOC (14%) 29 files
build and deployment1307 LOC (1%) 34 files
other28740 LOC (23%) 126 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 ".*".
  • 192 files match defined criteria (56,137 LOC, 100.0% vs. main code):
    • 114 *.rs files (50,390 LOC)
    • 67 *.proto files (4,422 LOC)
    • 8 *.py files (1,290 LOC)
    • 2 *.toml files (29 LOC)
    • 1 *.yaml files (6 LOC)
  • " *.rs" is biggest, containing 89.76% of LOC.
  • " *.yaml" is smallest, containing 0.01% of LOC.


*.rs50390 LOC (89%) 114 files
*.proto4422 LOC (7%) 67 files
*.py1290 LOC (2%) 8 files
*.toml29 LOC (<1%) 2 files
*.yaml6 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 ".*/[Tt]ests/.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/test_.*".
  • 83 files match defined criteria (18,980 LOC, 33.8% vs. main code):
    • 77 *.rs files (18,578 LOC)
    • 1 *.go files (179 LOC)
    • 4 *.proto files (137 LOC)
    • 1 *.py files (86 LOC)
  • " *.rs" is biggest, containing 97.88% of LOC.
  • " *.py" is smallest, containing 0.45% of LOC.


*.rs18578 LOC (97%) 77 files
*.go179 LOC (<1%) 1 file
*.proto137 LOC (<1%) 4 files
*.py86 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 ".*/src/gen/.*".
  • 29 files match defined criteria (18,068 LOC, 32.2% vs. main code). All matches are in *.rs files.


*.rs18068 LOC (100%) 29 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
gitattributes
mod
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 ".*/Cargo[.]toml".
    • files with paths like ".*[.]sh".
    • files with paths like ".*/[.]github/workflows/.*[.]ya?ml".
    • files with paths like ".*/[.]gitattributes".
    • files with paths like ".*/go[.]mod".
  • 34 files match defined criteria (1,307 LOC, 2.3% vs. main code):
    • 18 *.toml files (635 LOC)
    • 10 *.sh files (585 LOC)
    • 1 *.yaml files (53 LOC)
    • 3 *.gitignore files (25 LOC)
    • 1 *.gitattributes files (6 LOC)
    • 1 *.mod files (3 LOC)
  • " *.toml" is biggest, containing 48.58% of LOC.
  • " *.mod" is smallest, containing 0.23% of LOC.


*.toml635 LOC (48%) 18 files
*.sh585 LOC (44%) 10 files
*.yaml53 LOC (4%) 1 file
*.gitignore25 LOC (1%) 3 files
*.gitattributes6 LOC (<1%) 1 file
*.mod3 LOC (<1%) 1 file
Other Code
pb
proto
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 ".*[.]txt".
    • files with paths like ".*[.]json".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]pb".
  • 126 files match defined criteria (28,740 LOC, 51.2% vs. main code):
    • 7 *.pb files (18,632 LOC)
    • 23 *.rs files (2,805 LOC)
    • 16 *.md files (2,419 LOC)
    • 44 *.svg files (2,272 LOC)
    • 10 *.json files (2,187 LOC)
    • 7 *.proto files (250 LOC)
    • 6 *.toml files (86 LOC)
    • 9 *.txt files (58 LOC)
    • 4 *.yaml files (31 LOC)
  • " *.pb" is biggest, containing 64.83% of LOC.
  • " *.yaml" is smallest, containing 0.11% of LOC.


*.pb18632 LOC (64%) 7 files
*.rs2805 LOC (9%) 23 files
*.md2419 LOC (8%) 16 files
*.svg2272 LOC (7%) 44 files
*.json2187 LOC (7%) 10 files
*.proto250 LOC (<1%) 7 files
*.toml86 LOC (<1%) 6 files
*.txt58 LOC (<1%) 9 files
*.yaml31 LOC (<1%) 4 files
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
  • *.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
  • *.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
  • *.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:48