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.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

