go-linting

Configure golangci-lint workflows with .golangci.yml and //nolint directives.

8|Updated Jun 5, 2026
One-click install
npx skills add https://github.com/muratmirgun/gophers --skill go-linting-muratmirgun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-linting
Source: https://github.com/muratmirgun/gophers/tree/main/skills/go-linting
Command: npx skills add https://github.com/muratmirgun/gophers --skill go-linting-muratmirgun

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps teams establish a consistent, production-grade linting setup for Go projects so code quality rules are enforced the same way in local development and CI.

Core Features & Use Cases

  • Lint Configuration: Creates and maintains a checked-in .golangci.yml as the source of truth for project lint rules.
  • CI Enforcement: Guides integration of golangci-lint into pull request and branch protection workflows.
  • Suppression Hygiene: Shows how to use //nolint directives with specific linter names and clear reasons.
  • Incremental Adoption: Supports gradual rollout on legacy codebases with --new-from-rev and path-scoped exclusions.
  • Reference-Driven Tuning: Provides linter selection guidance, CI examples, and suppression patterns through supporting reference docs.

Quick Start

Ask the AI to set up a production-ready Go linting baseline, add the provided .golangci.yml, and wire the checks into CI with proper //nolint rules.

Frequently Asked Questions about go-linting

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

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

To configure golangci-lint, establish a checked-in .golangci.yml file as the source of truth for lint rules, pin the behavior, and select linters covering correctness, style, security, and test quality.

What is the best way to enforce Go linting rules in CI?

Enforce Go linting in CI by integrating golangci-lint into pull request checks and branch protection workflows, ensuring local development and CI apply the same production-grade rules.

How do I incrementally adopt golangci-lint on a legacy Go codebase?

Incrementally adopt golangci-lint on a legacy Go codebase by using the --new-from-rev flag and applying path-scoped exclusions to gradually roll out rules without breaking existing code.

How should I use //nolint directives to suppress linter warnings in Go?

Use //nolint directives with specific linter names and clear reasons to maintain suppression hygiene, ensuring bypassed lint rules are documented and intentional within your Go project.

Does golangci-lint support path-scoped exclusions for specific directories?

Yes, golangci-lint supports path-scoped exclusions, allowing teams to bypass specific lint rules for certain directories during incremental adoption or when handling legacy code sections.