Ruleguard

Define and run custom linting rules for your Go code using expressive pattern matching
Try it online!
Key features:
  • Custom linting rules without re-compilation and Go plugins
  • Diagnostics are written in a declarative way
  • Quickfix actions support
  • Powerful match filtering features, like expression type pattern matching
  • Not restricted to AST rules; it's possible to write a comment-related rule, for example
  • Rules can be installed as Go modules
  • Integrated into golangci-lint
Documentation: