Skip to content

Add Go and Rust BECs to the catalog#15

Merged
DataDave-Dev merged 2 commits into
DataDave-Dev:mainfrom
Chiragk352:add-go-rust-becs
Jun 30, 2026
Merged

Add Go and Rust BECs to the catalog#15
DataDave-Dev merged 2 commits into
DataDave-Dev:mainfrom
Chiragk352:add-go-rust-becs

Conversation

@Chiragk352

@Chiragk352 Chiragk352 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds two new BEC catalog bundles:

  • no-debug-go.bec.yaml
  • no-debug-rust.bec.yaml

Also updates becs/README.md to include the new catalog entries and language path information.

Related Issue

Closes #9

Summary by CodeRabbit

  • New Features
    • Added new blocking checks to help prevent debug output and panic-style calls in Go and Rust source files.
    • Expanded the BEC catalog documentation to include the new rules and broader path coverage for supported language bundles.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Two new blocking BEC rules are added to the catalog: no-debug-go.bec.yaml (forbids fmt.Println( and panic( in Go files) and no-debug-rust.bec.yaml (forbids dbg!() and println!() in Rust files). The catalog README is updated to list these new rules and extend the path-glob description to cover Go and Rust.

Go and Rust no-debug BEC rules

Layer / File(s) Summary
New Go and Rust BEC rule definitions + README
becs/no-debug-go.bec.yaml, becs/no-debug-rust.bec.yaml, becs/README.md
Adds two blocking forbid-based BEC rules targeting **/*.go and **/*.rs respectively, and updates the catalog table and glob description in the README.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Hop, hop, no println! today,
No fmt.Println( sneaking away,
dbg! and panic — begone from the code!
The rabbit says: keep clean the road.
Pure YAML rules, no logic to fear! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks the required What, Why, and Checklist sections from the template. Rewrite the PR description using the repository template and fill in What, Why, and Checklist with the required details.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding Go and Rust BECs to the catalog.
Linked Issues check ✅ Passed The PR adds the requested Go and Rust forbid-based bundles and updates becs/README.md, matching the linked issue scope.
Out of Scope Changes check ✅ Passed The changes are limited to the new Go/Rust bundles and the README update, with no clear unrelated edits.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@becs/no-debug-go.bec.yaml`:
- Around line 9-10: The Go rule is currently matching test files as well as
production code, so scope the file selection in the rule configuration to
exclude `*_test.go` and keep it limited to production `.go` files. Update the
glob or add an explicit test-file exclusion in the `paths` section so the rule
only applies where intended.

In `@becs/no-debug-rust.bec.yaml`:
- Around line 9-10: The Rust path glob is currently too broad and matches test
files as well as production code. Update the paths configuration in this rule to
target only the production Rust tree or explicitly exclude test locations, using
the existing paths entry in the no-debug-rust rule so it no longer applies to
test sources.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 15070637-c095-4b2c-81f0-150e964e9e19

📥 Commits

Reviewing files that changed from the base of the PR and between 5bdd1fe and a73ea66.

📒 Files selected for processing (3)
  • becs/README.md
  • becs/no-debug-go.bec.yaml
  • becs/no-debug-rust.bec.yaml

Comment thread becs/no-debug-go.bec.yaml
Comment on lines +9 to +10
paths:
- "**/*.go"

Copy link
Copy Markdown

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:

#!/bin/bash
set -euo pipefail

git ls-files becs | sed -n '1,200p'
printf '\n--- becs/no-debug-go.bec.yaml ---\n'
cat -n becs/no-debug-go.bec.yaml
printf '\n--- search for no-debug-go references ---\n'
rg -n "no-debug-go|paths:|\\*\\*/\\*\\.go|_test\\.go" becs . -g '*.yaml' -g '*.yml' -g '*.bec.yaml' -g '*.bec.yml' || true

Repository: DataDave-Dev/becwright

Length of output: 2010


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "noop"

Repository: DataDave-Dev/becwright

Length of output: 165


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' "Need to inspect the BEC file and related rule definitions."

Repository: DataDave-Dev/becwright

Length of output: 219


Scope the Go rule to production files. **/*.go also 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
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@becs/no-debug-go.bec.yaml` around lines 9 - 10, The Go rule is currently
matching test files as well as production code, so scope the file selection in
the rule configuration to exclude `*_test.go` and keep it limited to production
`.go` files. Update the glob or add an explicit test-file exclusion in the
`paths` section so the rule only applies where intended.

Comment on lines +9 to +10
paths:
- "**/*.rs"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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/**' || true

Repository: 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
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@becs/no-debug-rust.bec.yaml` around lines 9 - 10, The Rust path glob is
currently too broad and matches test files as well as production code. Update
the paths configuration in this rule to target only the production Rust tree or
explicitly exclude test locations, using the existing paths entry in the
no-debug-rust rule so it no longer applies to test sources.

@DataDave-Dev
DataDave-Dev merged commit f25c60f into DataDave-Dev:main Jun 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Go and Rust BECs to the catalog

2 participants