con un clic
run-golangci-lint
// Run golangci-lint linters and fix any linting errors. Use when fixing lint issues or before committing code.
// Run golangci-lint linters and fix any linting errors. Use when fixing lint issues or before committing code.
| name | run-golangci-lint |
| description | Run golangci-lint linters and fix any linting errors. Use when fixing lint issues or before committing code. |
| allowed-tools | Bash(make *), Read, Grep, Glob |
| context | fork |
Run make lint-fix to auto-fix linting errors across the entire project, then fix any remaining errors manually.
make lint-fixmake lint-fix to confirm zero errorsrun-tests skill to confirm no regressions — only if the lint fixes involved significant code changes (e.g. refactoring logic, splitting functions). Skip for trivial fixes like renaming, formatting, or comment edits.Line length (lll): Move each function parameter or return value to its own line.
Duplicate code (dupl): First try to refactor the test to eliminate duplication (extract helpers, use table-driven tests). If the test becomes significantly harder to read after refactoring, add //nolint:dupl // test helper duplication aids readability. Note: dupl is excluded from api/* and internal/*.
Other errors: Fix the root cause directly. Do not add //nolint unless the false-positive is clear and add a comment explaining why.
Complex / subjective issues: Explain the trade-offs and ask for user approval before making changes.
If fixing one error introduces new errors, address them in order of severity. Re-run make lint-fix after each manual pass. Continue until make lint-fix exits cleanly and the run-tests skill passes.
Use when adding a new field to an existing Custom Resource. Guides the full workflow: API types, code generation, CRD examples, client investigation, handler mapping, and tests.
Use when generating testify mocks for an interface. Ensures the interface is registered in .mockery.yml, runs make mocks, and verifies the output file.
Run tests for the edp-keycloak-operator. By default runs unit + integration tests. Use /run-tests e2e for end-to-end tests.