golang-lint

Automate Go code linting with a centralized golangci-lint v2 configuration.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/osmanozen/go-commerce --skill golang-lint-osmanozen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-lint
Source: https://github.com/osmanozen/go-commerce/tree/main/.agents/skills/golang-linter
Command: npx skills add https://github.com/osmanozen/go-commerce --skill golang-lint-osmanozen

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Linting Go code is error-prone and time-consuming without a central, configurable framework; this skill provides structured best practices, tooling configuration, and guidance for integrating golangci-lint into Go projects.

Core Features & Use Cases

  • Provides a ready-to-use golangci-lint configuration with 33 linters enabled
  • Documents suppression patterns with safe rules (nolint directives) and recommended practices
  • Includes a reference guide for linter categories, common issues, and migration tips for v2

Quick Start

Configure your Go project by placing the provided .golangci.yml at the project root and run golangci-lint run ./... to scan and fix issues.

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?

To configure golangci-lint, place a .golangci.yml file at your project root and run `golangci-lint run ./...` to scan code. This skill provides a ready-to-use v2 configuration with 33 linters enabled.

What is the best way to enforce code quality in Go during CI?

The best way to enforce Go code quality in CI is using a centralized golangci-lint configuration. This skill provides a ready asset configuration to enforce correctness, style, and security across codebases of all sizes.

How do I safely suppress golangci-lint warnings in Go?

You can safely suppress golangci-lint warnings using documented nolint directives. This skill includes suppression patterns with safe rules and recommended practices to manage linting exceptions without compromising code reliability.

Does this golangci-lint configuration support v2 migration?

Yes, this golangci-lint configuration conforms to a v2 config at the project root. It includes a reference guide with migration tips for v2, covering linter categories and common issues for transitioning Go projects.

Why do I need a centralized framework for Go static analysis?

A centralized framework for Go static analysis is needed because linting code is error-prone and time-consuming without structured best practices. It provides standardized tooling configuration to ensure consistent correctness and security checks.