Repository navigation
feat(rules,allowlist): exclude Cargo test/benchmark paths and refine Rust rules - #1971
Merged
lizhengfeng101 merged 2 commits intoNov 21, 2026
Merged
Conversation
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 6 selected item(s). |
wu21-web
reviewed
Nov 18, 2026
Contributor
There was a problem hiding this comment.
I won't consider support go.mod because it is a package lock generated by Go, it doesn't need to be reviewed. You can keep the Cargo test exclusion though.
alex09x
force-pushed
the
feat/go-mod-and-rust-test-rules
branch
from
November 20, 2026 00:22
6d8cf66 to
9b8f85f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
What was wrong
default_exclude_patterns.jsononly listed**/*_test.rsfor Rust, so standard Cargo integration tests (tests/**/*.rs), module test files (tests.rs,*_tests.rs), and benchmarks (benches/**/*.rs) were reviewed as production code againstrust.md(accounting for 56%, 30%, and 24% of reviewed insertions across three multi-file Rust commits we tested).What this PR changes
**/*_tests.rs,**/tests.rs,**/tests/**/*.rs, and**/benches/**/*.rstointernal/config/allowlist/default_exclude_patterns.json(and the localizedreview-rules.mddocs).internal/config/rules/rule_docs/rust.md, matchinggo.mdandswift.md.internal/config/allowlist,internal/agent, andinternal/scan.Type of Change
How Has This Been Tested?
make testpasses locallyManual testing (describe below)
Ran
bash scripts/verify-license.sh,git diff origin/main --check,LC_ALL=C go vet $(go list ./... | grep -v /extensions/), andLC_ALL=C go test -race -count=1 ./internal/config/allowlist ./internal/config/rules ./internal/agent ./internal/scan.Ran
LC_ALL=C go test -count=1 -coverprofile=coverage.out $(go list ./... | grep -v /extensions/): 25 of 26 packages passed (allowlist92.3%,rules92.5%,agent91.4%,scan93.1%);TestPendingLoginConcurrentAccountOperations/return-loginininternal/chatgptauth(untouched by this PR) timed out on our test host. Re-running with-skip "^TestPendingLoginConcurrentAccountOperations/return-login$"passed all 26 packages with 93.0% total statement coverage.Checklist
go fmt,go vet)Used Google Antigravity (Gemini) and Claude Code.
Related Issues
Closes #1970