go-linting

Apply a curated set of Go linters via golangci-lint to enforce code quality.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/HadiCherkaoui/opencode-config --skill go-linting-hadicherkaoui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-linting
Source: https://github.com/HadiCherkaoui/opencode-config/tree/main/skills/golang/go-linting
Command: npx skills add https://github.com/HadiCherkaoui/opencode-config --skill go-linting-hadicherkaoui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go linting is essential to catch issues early and maintain code quality in Go projects. This Skill provides a recommended set of linters and a golangci-lint configuration to streamline linting in CI/CD.

Core Features & Use Cases

  • Minimum Recommended Linters: errcheck, goimports, revive, govet, staticcheck.
  • Lint Runner: golangci-lint: Benefits include performance, unified config, extensibility.
  • Example Configuration: Create .golangci.yml in project root with appropriate settings for your repo.

Quick Start

Install golangci-lint and run golangci-lint to lint your Go project using the provided config.

Frequently Asked Questions about go-linting

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

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

Set up golangci-lint by creating a .golangci.yml configuration file in your project root with a curated set of linters. This standardizes linting across the codebase to catch common issues and maintain consistency.

What linters should I use for Go code quality?

For Go code quality, use a recommended minimum set including errcheck, goimports, revive, govet, and staticcheck. These linters catch common issues early and enforce consistency across projects of any size.

Can I run Go linting in CI/CD pipelines?

Yes, you can run Go linting in CI/CD pipelines. The provided golangci-lint configuration is applicable in both local development and CI/CD environments to catch issues early and maintain code quality.

Why use golangci-lint over individual Go linters?

Use golangci-lint over individual linters for its performance, unified configuration, and extensibility. It applies a curated set of linters through a single ready-to-use .golangci.yml file.

Does this Go linting setup work for repositories of any size?

Yes, this Go linting setup works for repositories of any size. It applies a recommended linter set to enforce code quality and maintain consistency regardless of project scale.