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
.go → go and .rs → rust 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).
Context
becwright initauto-detects languages and scaffolds starter rules, butsrc/becwright/cli.pyonly recognizes Python/JS/TS —_EXT_LANGand_starter_ruleswere never updated after the Go/Rust catalog BECs landed (#15). A pure Go or Rust repo currently getsrules: [].Proposal
.go→goand.rs→rustto_EXT_LANG._starter_rules, mirroringbecs/no-debug-go.bec.yaml/becs/no-debug-rust.bec.yaml, e.g.:becwright run forbid --pattern 'fmt\.Println\s*\(|panic\s*\('becwright run forbid --pattern 'dbg!\s*\(|println!\s*\('Acceptance criteria
.go/.rsfiles yields matching starter rules.tests/test_init.py(test_starter_rules_*,test_detect_languages_*).Files:
src/becwright/cli.py(_EXT_LANG,_detect_languages,_starter_rules).