-
Notifications
You must be signed in to change notification settings - Fork 7
Add Go and Rust BECs to the catalog #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| becwright_bec: 1 | ||
| exported_from: https://github.com/DataDave-Dev/becwright | ||
| rule: | ||
| id: no-debug-go | ||
| intent: > | ||
| Do not leave debug output or panic calls in Go code. | ||
| why_it_matters: > | ||
| Debug statements and unexpected panic calls should not reach production. | ||
| paths: | ||
| - "**/*.go" | ||
| severity: blocking | ||
| check: | ||
| kind: builtin | ||
| module: forbid | ||
| args: "--pattern 'fmt\\.Println\\s*\\(|panic\\s*\\('" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| becwright_bec: 1 | ||
| exported_from: https://github.com/DataDave-Dev/becwright | ||
| rule: | ||
| id: no-debug-rust | ||
| intent: > | ||
| Do not leave debug output in Rust code. | ||
| why_it_matters: > | ||
| Debug macros and leftover println! calls should not reach production. | ||
| paths: | ||
| - "**/*.rs" | ||
|
Comment on lines
+9
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf 'Files matching becs/no-debug-rust.bec.yaml and nearby docs:\n'
git ls-files 'becs/no-debug-rust.bec.yaml' 'becs/*' 'README.md' | sed -n '1,120p'
printf '\nOutline of becs/no-debug-rust.bec.yaml if supported:\n'
if command -v ast-grep >/dev/null 2>&1; then
ast-grep outline becs/no-debug-rust.bec.yaml || true
fi
printf '\nContents of becs/no-debug-rust.bec.yaml with line numbers:\n'
cat -n becs/no-debug-rust.bec.yaml
printf '\nSearch for no-debug-rust references and glob/docs about tests:\n'
rg -n "no-debug-rust|paths:|\\*\\*/\\*\\.rs|test files|tests?" becs README.md .github . -g '!**/.git/**' || trueRepository: DataDave-Dev/becwright Length of output: 15600 Scope the Rust rule to production files. This glob applies to all Rust files, including tests. If the rule is meant for production code only, narrow it to the production tree or exclude test paths. 🤖 Prompt for AI Agents |
||
| severity: blocking | ||
| check: | ||
| kind: builtin | ||
| module: forbid | ||
| args: "--pattern 'dbg!\\s*\\(|println!\\s*\\('" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: DataDave-Dev/becwright
Length of output: 2010
🏁 Script executed:
Repository: DataDave-Dev/becwright
Length of output: 165
🏁 Script executed:
Repository: DataDave-Dev/becwright
Length of output: 219
Scope the Go rule to production files.
**/*.goalso matches*_test.go, so this rule will fire in tests even though the intent and rationale are production-only. Narrow the glob or add an explicit test-file exclusion.🤖 Prompt for AI Agents