Skip to content

maratori/golangci-lint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

110 Commits
 
 
 
 
 
 

Repository files navigation

Golangci-lint Golden Config

Opinionated golangci-lint configuration. Intentionally strict (but not draconian) to surface bugs, security issues, and style problems early while avoiding the noisiest checks.

It was originally published as a popular github gist Stars

Quick Start

  1. Copy .golangci.yml to the root of your Go module.
  2. Set formatters.settings.goimports.local-prefixes to your module path (for example, github.com/acme/service).
  3. Run golangci-lint run ./... from the project root.

Versioning

Customizing

  • Adjust the module prefix (formatters.settings.goimports.local-prefixes).
  • Toggle linters or tune their settings to match your risk tolerance.
  • Refine linters.exclusions.rules.
  • Optional extras are marked with ## you may want to enable; uncomment what you need.

What's Inside

  • Every supported linter and formatter is listed, with disabled ones commented for quick discovery.
  • Each entry includes a short comment explaining its purpose.
  • Only non-default options appear here; full defaults live in .golangci.reference.yml.
  • Common false positives are pre-collected under linters.exclusions.rules.

License

MIT License. See LICENSE for details.

About

Golden config for golangci-lint

Resources

License

Stars

Watchers

Forks