plugins/code-review/skills/go-code-review/SKILL.md
Language-specific review guidance for Go code including idiomatic patterns, test conventions, and build commands
npx skillsauth add openshift-eng/ai-helpers go-code-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides Go-specific guidance for code quality reviews. It is loaded automatically by the pre-commit-review command when --language go is specified or when .go files are detected among the changed files.
Use this skill when reviewing Go source code. Its sections are referenced during the unit test coverage, idiomatic code, and build verification review steps.
t.Run() for subtests to provide clear test case identificationt.Parallel() at the top of test functions and subtests where tests are independent-race flag — avoid shared mutable state between parallel tests_test.go suffixt.Helper() in test helper functions so failure messages report the caller's line numberFollow the conventions in Effective Go and the Go Code Review Comments wiki. Key reminders:
gofmt. Unformatted code is a blocking issueMixedCaps / mixedCaps. Avoid stuttering (http.Server not http.HTTPServer). Acronyms are all caps (URL, HTTP, ID)fmt.Errorf("context: %w", err) to preserve the chain for errors.Is() / errors.As()context.Context as the first parameter to functions that perform I/O or may be long-runningUse the following commands in priority order during build verification:
make test if a Makefile with a test target exists; otherwise go test -race ./...make verify if available; otherwise go vet ./...make build if available; otherwise go build ./...research
Shared engine for analyzing Jira issue activity and generating status summaries
testing
Snapshot OpenShift payload data (release controller, PR diffs, comments, CI jobs, JUnit results, regression tracking) to a local directory for offline analysis
development
Analyze a payload snapshot to identify root causes of blocking job failures, score candidate PRs, and produce an HTML report with revert recommendations
tools
Create TRT JIRA bugs, open revert PRs, and trigger payload jobs for high-confidence revert candidates