# Run Golangci Lint

> Run golangci-lint linters and fix any linting errors. Use when fixing lint issues or before committing code.

- Skill: `epam/run-golangci-lint` (Agent Skill)
- Install (CLI): `npx skillmds@latest add epam/run-golangci-lint`
- Raw SKILL.md: https://api.skillmd.com/api/skills/epam/run-golangci-lint/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: epam (https://skillmd.com/u/epam)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/epam/run-golangci-lint

---


## Task

Run `make lint-fix` to auto-fix linting errors across the entire project, then fix any remaining errors manually.

## Workflow

1. Run `make lint-fix`
2. Review the output — note what was auto-fixed and what errors remain
3. Fix remaining errors manually (see guidelines below)
4. Run `make lint-fix` to confirm zero errors
5. Run the `run-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.

## Fix Guidelines

**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**: Leave them unchanged and list the trade-offs in your final report; this skill runs in a forked context where the user cannot answer mid-task.

## Iteration

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.

