{"repo":"quasilyte/go-ruleguard","free":true,"listed":false,"github":"https://github.com/quasilyte/go-ruleguard","clone":"git clone https://github.com/quasilyte/go-ruleguard.git","description":"Define and run pattern-based custom linting rules.","language":"Go","stars":877,"topics":["go","golang","gogrep","linter","static-analysis","ruleguard","go-analysis","analysis","dynamic-rules","codeql"],"license":"BSD-3-Clause","category":"dev-tools","readme_excerpt":"go-ruleguard Overview analysis-based Go linter that runs dynamically loaded rules. You write the rules, ruleguard checks whether they are satisfied. ruleguard has some similarities with GitHub CodeQL, but it's dedicated to Go only. 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 and distributed as Go modules Rules can be developed, debugged and profiled using the conventional Go tooling Integrated into golangci-lint It can also be easily embedded into other static analyzers. go-critic can be used as an example. Quick start It's advised that you get a binary from the latest release {linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64, windows/arm64}. If you want to install the ruleguard from source, it's as simple as: If inside a Go module, the dsl package will be installed for the current module, otherwise it installs the package into the $GOPATH and it will be globally available. If $GOPATH/bin is under your system $PATH , ruleguard command should be available after that: Create a test rules.go file: Create a test example.go target file: Run ruleguard on that target file: Since we ran ruleguard with -fix argument, both suggested changes are applied to example.go . There is also a -e mode t","default_branch":null,"files":null,"tree":[],"storefront":"/r/quasilyte","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/quasilyte/go-ruleguard/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}