golang-lint

Configure v2 golangci-lint with recommended linters and nolint directives.

7|1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/Harmeet10000/skills --skill golang-lint-harmeet10000
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-lint
Source: https://github.com/Harmeet10000/skills/tree/main/skills/backend/Golang/golang-lint
Command: npx skills add https://github.com/Harmeet10000/skills --skill golang-lint-harmeet10000

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Go projects often struggle with inconsistent lint configurations and scattered lint guidance, risking unnoticed defects and brittle code.

Core Features & Use Cases

  • Centralized, v2 GolangCI configuration with the recommended linters (govet, staticcheck, errcheck, gofumpt)
  • Clear guidance on enabling/disabling linters, interpreting lint output, and applying per-line suppressions with proper nolint directives
  • Best practices for nolintlint to enforce explicit linter names and explanations, reducing silent suppressions
  • Processes for incremental adoption on legacy codebases and safe, parallel cleanup workflows

Quick Start

Create a v2 .golangci.yml configured with govet, staticcheck, errcheck, and gofumpt, then run golangci-lint run ./... to start linting.

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 new Go project?

Configure golangci-lint by creating a v2 .golangci.yml file with recommended linters like govet, staticcheck, errcheck, and gofumpt, then run golangci-lint run ./... to lint your Go project.

What is the best way to suppress golangci-lint warnings in legacy Go code?

The best way to suppress golangci-lint warnings is applying per-line nolint directives with explicit linter names and explanations, enforced by nolintlint, to reduce silent suppressions and maintain project-wide lint hygiene.

How do I incrementally adopt static analysis and linting on a large legacy Go codebase?

Incrementally adopt Go linting on legacy codebases by using centralized v2 golangci-lint configurations alongside safe, parallel cleanup workflows, allowing you to resolve warnings progressively without disrupting development.

Why does nolintlint require explicit linter names in nolint directives?

Nolintlint requires explicit linter names in nolint directives to enforce best practices for targeted suppression of warnings, reducing silent suppressions and ensuring all bypassed static analysis checks are documented.

Can I adjust per-linter settings in a v2 golangci-lint setup?

Yes, you can adjust per-linter settings within a v2 golangci-lint setup. The configuration standardizes enabling and disabling specific linters like staticcheck or gofumpt to suit your project's code quality requirements.