Skip to content

becwright init should detect Go and Rust #26

Description

@DataDave-Dev

Context

becwright init auto-detects languages and scaffolds starter rules, but src/becwright/cli.py only recognizes Python/JS/TS — _EXT_LANG and _starter_rules were never updated after the Go/Rust catalog BECs landed (#15). A pure Go or Rust repo currently gets rules: [].

Proposal

  • Add .gogo and .rsrust to _EXT_LANG.
  • Add Go/Rust starter rules in _starter_rules, mirroring becs/no-debug-go.bec.yaml / becs/no-debug-rust.bec.yaml, e.g.:
    • Go: becwright run forbid --pattern 'fmt\.Println\s*\(|panic\s*\('
    • Rust: becwright run forbid --pattern 'dbg!\s*\(|println!\s*\('

Acceptance criteria

  • A repo with .go/.rs files yields matching starter rules.
  • Tests added next to the existing ones in tests/test_init.py (test_starter_rules_*, test_detect_languages_*).

Files: src/becwright/cli.py (_EXT_LANG, _detect_languages, _starter_rules).

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions