golang-lint

Configure and run golangci-lint v2 with justified //nolint suppressions.

1|Updated May 27, 2026
One-click install
npx skills add https://github.com/dmwin72015/netdisk --skill golang-lint-dmwin72015
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-lint
Source: https://github.com/dmwin72015/netdisk/tree/main/.agents/skills/golang-lint
Command: npx skills add https://github.com/dmwin72015/netdisk --skill golang-lint-dmwin72015

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires go, golangci-lint, and includes assets (resource) and references (resource) components.

What problem does it solve?

This Skill helps Go teams reduce bugs and quality regressions by standardizing how golangci-lint is configured, run, and interpreted, especially when deciding whether to fix issues or suppress false positives.

Core Features & Use Cases

  • Setup mode: Configure a production-ready .golangci.yml (version v2), enable/disable the right linters, and tune settings for your codebase.
  • Coding mode: Run golangci-lint with auto-fix for changed Go files using golangci-lint run --fix, while you continue implementing features.
  • Interpret/fix mode: Understand lint output (including the linter name), fix underlying causes, and apply //nolint:<linter> // reason suppressions correctly and safely.

Quick Start

Configure your Go project’s .golangci.yml using the recommended linters and settings, then run lint with auto-fixes and explain any remaining findings so you can fix or suppress them with justified //nolint directives.

Frequently Asked Questions about golang-lint

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure golangci-lint for a Go project?

You configure golangci-lint by generating a `.golangci.yml` file using the v2 configuration structure, enabling appropriate linters, and tuning settings to match your Go codebase for reliable code quality.

What is the correct way to suppress golangci-lint warnings?

You suppress golangci-lint warnings safely by applying `//nolint:<linter> // reason` directives, ensuring you include the specific linter name and a justification to avoid masking real code quality issues.

How do I auto-fix linting errors in Go files?

Auto-fix linting errors in Go files by running `golangci-lint run --fix` on changed files, automatically resolving safe issues while you continue implementing features and addressing remaining findings manually.

Do I need golangci-lint installed to lint Go code?

Yes, you need both the `go` environment and the `golangci-lint` tool installed to run static analysis, interpret linter-tagged output, and apply justified `//nolint` suppressions for your codebase.

How do I interpret golangci-lint output to fix issues?

Interpret golangci-lint output by reading the linter name tagged in each finding, then triage whether to fix the underlying cause directly or apply a justified `//nolint` suppression for false positives.

When should I use nolint instead of refactoring Go code?

Use `//nolint` instead of refactoring when a lint warning is a false positive or when fixing it risks breaking functionality, ensuring you always document the specific linter name and a clear rationale.