go-ruleguard – analysis-based Go linter that runs dynamically loaded rules

go-ruleguard is a Go static analysis tool that helps developers define project-specific linting checks and run them against Go code.

Rules are written as Go source files with the project’s DSL, making it possible to describe code patterns, conditions, diagnostics, and suggested fixes in a form that fits naturally into Go development workflows. It can be used from the command line and also fits into broader Go analysis pipelines.

This is free and open source software.

Key Features

  • Uses an analysis-based engine to run dynamically loaded rule sets against Go files and packages.
  • Provides a declarative DSL for defining matches, conditions, reports, and suggested code fixes.
  • Supports quickfix actions and can apply suggested changes automatically with the command-line tool.
  • Offers powerful filtering features, including type pattern matching and checks that are not limited to simple AST rules.
  • Allows rule sets to be packaged and distributed as Go modules.
  • Integrates with golangci-lint and can also be embedded into other static analyzers.

Website: github.com/quasilyte/go-ruleguard
Support:
Developer: Alex (quasilyte)
License: BSD 3-Clause License

go-ruleguard is written in Go. Learn Go with our recommended free books and free tutorials.


Related Software

Go Linters
reviveDesigned as a drop-in replacement for golint
golangci-lintFast Go linters runner
gosecSecurity scanner for Go projects
StaticcheckAdvanced Go linter
go-criticOpinionated Go source code linter
VetExamines Go source code and reports suspicious constructs
gofumptStricter gofmt
gofmtFormats Go programs
goconstFind repeated Go literals that could be replaced with constants
go-ruleguardAnalysis-based Go linter that runs dynamically loaded rules
sloglintEnforce consistent structured logging conventions in Go
forbidigoGo linter for forbidding identifiers
godotKeep source code comments consistent
Godoc-LintEnforce consistent documentation comments in Go code
exhaustiveCheck Go switch statements for missing enum cases

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted