feat(rules): add comprehensive built-in Go review guidance - #569
Merged
lizhengfeng101 merged 2 commits intoJul 29, 2026
Conversation
Contributor
|
✅ OpenCodeReview: No comments generated. Looks good to me. |
lizhengfeng101
left a comment
Collaborator
There was a problem hiding this comment.
Nice work overall — the rule doc is thorough and well-structured.
One suggestion: consider removing the #### References section at the end of go.md.
- No other rule doc (
python.md,java.md, etc.) includes a references section — this breaks consistency. - The rule doc serves as a system prompt for the AI reviewer, which cannot follow URLs. The links are not actionable.
- The behavioral guidance embedded in that section ("don't turn style preferences into findings", "check stdlib docs before reporting") is already covered throughout the body (the opening paragraph's tooling-dedup instruction, per-section "Confirm … before reporting" clauses, etc.).
Removing it keeps the doc focused and consistent with the rest of the rule set.
Contributor
Author
I have implemented your suggestions |
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
Adds built-in, Go-specific review rules and maps
**/*.gofiles to them.The new rule focuses on high-confidence Go correctness, concurrency, resource lifecycle, boundary, and security findings. It requires evidence before reporting non-local concerns and avoids duplicating findings better handled by
gofmt,go vet, Staticcheck, the compiler, or the race detector.It preserves OCR’s default exclusion of
*_test.gofiles.Type of Change
How Has This Been Tested?
make testpasses locallyManual testing (describe below)
Ran
go test ./...successfully.Added resolver coverage confirming root, nested, and uppercase
.GOpaths select the built-in**/*.gorule.Confirmed existing
*_test.goexclusion coverage remains passing.Checklist
go fmt,go vet)Related Issues
Closes #550