go-lint

Automate Go code linting and formatting with golangci-lint.

4|Updated Sep 6, 2013
One-click install
npx skills add https://github.com/mway/dotfiles --skill go-lint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-lint
Source: https://github.com/mway/dotfiles/tree/main/home/dot_codex/skills/go-lint
Command: npx skills add https://github.com/mway/dotfiles --skill go-lint

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go projects often suffer from inconsistent style and undetected issues. golangci-lint helps ensure code quality by linting and formatting Go code across the repository.

Core Features & Use Cases

  • Automatic linting with fixes: Lint and auto-fix issues across all packages with a single command.
  • Targeted linting: Lint a specific package or path to focus on a subset of code.
  • Issue visibility: Run lint without applying changes to review issues first.
  • Flags and defaults: Leverage --new-false (deprecated) or --new=false, and default path to ./... for all packages.

Quick Start

Run golangci-lint run --new-false --fix ./...

Frequently Asked Questions about go-lint

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

FAQPage Schema
How do I automatically lint and fix Go code across my repository?

You can lint and auto-fix Go code across all packages by running golangci-lint with the --fix flag. This applies formatting corrections and resolves detected issues automatically across the entire repository.

Can I lint a specific package or path instead of the whole Go project?

Yes, you can target a specific package or path for linting by providing the directory path instead of using the default ./... argument. This focuses static analysis on a subset of your code.

How do I review golangci-lint issues without applying changes?

Run golangci-lint without the --fix flag to review issues without applying changes. This provides visibility into code quality errors and style inconsistencies before committing any automatic fixes.

Does this linting Skill work for large Go monorepos?

Yes, the linting automation applies to Go projects of varying sizes, from single packages to monorepos. It defaults to the ./... path to ensure all packages within the repository are analyzed.

What is the default path used when linting Go code?

The default path used when linting Go code is ./..., which targets all packages and sub-packages within your current working directory. You can override this by specifying a custom target path.