Releases: quasilyte/go-ruleguard
Releases · quasilyte/go-ruleguard
v0.3.6
Changes
- internal/gogrep: allow
f($*_)
to match variadic calls @quasilyte (#239) - ruleguard: handle variadic vars in filters properly @quasilyte (#238)
- ruleguard/typematch: add
interface{$*_}
pattern support @quasilyte (#236) - ruleguard: implement Var.Line filter @quasilyte (#234)
- dsl: add Var.Line field @quasilyte (#233)
v0.3.5
Changes
- cmd/gorules: add DocNote field @quasilyte (#231)
- ruleguard: add DocNote field @quasilyte (#230)
- cmd/gorules: initial commit @quasilyte (#229)
- ruleguard: add Engine.LoadedGroups method @quasilyte (#228)
- ruleguard: add support for structured doc comments @quasilyte (#227)
- analyzer/testdata: fix emptyStringTest rule for gocritic @quasilyte (#226)
- gogrep: improve FieldList matching inside func types @quasilyte (#225)
v0.3.4
Changes
- ruleguard: implement
MatchComment
function from the DSL @quasilyte (#223) - dsl: add MatchComment method to the DSL module @quasilyte (#222)
v0.3.3
Changes
- a complete gogrep rewrite @quasilyte (#221)
- ruleguard: use parseError.error field for the returned error @quasilyte (#220)
v0.3.2
Changes
- Change %v to %w so we can call Unwrap @sebastien-rosset (#217)
- fix typo @sebastien-rosset (#216)
- Fix filename @AlekSi (#218)
v0.3.1
Changes
Highlights:
- added more package imports caching
- started gogrep matching engine rewriting
- added non-strict literal matching
Bug fixes
- gogrep: save and restore wildcard positions during
$*
backtracking @quasilyte (#211)
DSL
- dsl/types: add types.Array and types.Slice @quasilyte (#213)
- ruleguard: allow FQN in Implements() filter @quasilyte (#187)
Performance
- ruleguard: add loaded package deps to cache @quasilyte (#194)
- gogrep: don't copy capture slice during backtracking @quasilyte (#210)
- gogrep: use slices instead of maps for capture data @quasilyte (#209)
Rules
- rules: add emptyError rule @quasilyte (#208)
Dev
- all: improve test coverage, update dsl package to v0.3.1 @quasilyte (#214)
- makefile: use "./..." everywhere + use coverpkg for coverage profiles @quasilyte (#212)
- gogrep: add more tests @quasilyte (#206)
- gogrep: rewrite matching code @quasilyte (#205)
- gogrep: remove unused *types.Info field from the matcher @quasilyte (#204)
- gogrep: simplify expr/stmt list matching @quasilyte (#203)
- gogrep: encode varInfo into the ast.Ident directly @quasilyte (#202)
- gogrep: use different parsing func in tests @quasilyte (#201)
- gogrep: add more capture tests @quasilyte (#200)
- gogrep: add capture tests @quasilyte (#199)
- gogrep: update gogrep code (from upstream) + rewrite tests @quasilyte (#198)
- gogrep: remove unused code @quasilyte (#197)
- ruleguard/quasigo: fix flaky NoAllocs test @quasilyte (#196)
- analyzer: reduce metachar escaping in want regexps by using \Q @mlevesquedion (#195)
- update the dsl package dependency version @quasilyte (#190)
- analyzer: don't print "e: " prefix in
-e
mode @quasilyte (#189) - ruleguard: fix nil engine state for bundles @quasilyte (#185)
- ruleguard/quasigo: improve "bad ret type" error message @quasilyte (#186)
v0.3.0
Changes
Summary:
- Custom filters support (see examples)
- Debug modes (
-debug-group
,-debug-filter
, ...) - Ruleguard bundles
Bug fixes
- ruleguard: fix interpolation of vars with common prefix @quasilyte (#123)
- ruleguard: set GoRuleInfo fields before passing it to Report() @quasilyte (#147)
- ruleguard: use alternative types.Implements() implementation @quasilyte (#161)
DSL
- dsl: add experimental API related to the custom filters @quasilyte (#171)
- ruleguard: allow Var.Value.Int() and Var.Text as RHS @quasilyte (#126)
- ruleguard,dsl: add Var.Node filters @quasilyte (#124)
- dsl: add a bundle sketch @quasilyte (#145)
- all: forbid unnamed rule groups
func _()
@quasilyte (#148) - all: rename "dsl/fluent" to just "dsl" @quasilyte (#151)
- add custom filter functions initial support @quasilyte (#173)
CLI
- ruleguard: filter parsing improvements @quasilyte (#142)
- analyzer: add -enable and -disable flags @quasilyte (#164)
- ruleguard,analyzer: add -debug-imports flag @quasilyte (#163)
- analyzer: add optional version info (only when built with Make) @quasilyte (#180)
Rules
- add bad defer unlock @cristaloleg (#131)
- add redundant len check @cristaloleg (#132)
Docs
- move docs->_docs, test->_test @quasilyte (#162)
- _docs: update the manual @quasilyte (#182)
Dev
- ci: add coverage @cristaloleg (#122)
- fix CI @cristaloleg (#133)
- add golangci config and enable go-critic @quasilyte (#143)
v0.2.1
Changes
DSL
- ruleguard: allow
error
type inImplements()
filter @quasilyte (#120) - ruleguard,dsl: add experimental support for const value filters @quasilyte (#116)
- ruleguard,dsl: add File.PkgPath filter support @quasilyte (#106)
- ruleguard: give error on repeated DSL calls @quasilyte (#102)
- ruleguard,dsl: add File.Name filter support @quasilyte (#101)
- all: add ExprType.Underlying() method @quasilyte (#89)
- ruleguard/typematch: implement struct type pattern matching @quasilyte (#87)
- ruleguard: support parenthesized expressions in Where @lamg (#76)
CLI
- ruleguard,analyzer: implement rules debugging @quasilyte (#104)
- all: add support for the File filters in Where clause @quasilyte (#83)
- ruleguard/typematch: implement func type patterns @quasilyte (#82)
Rules
- rules.go: add context.TODO @cristaloleg (#119)
- rules.go: add badLock rule @quasilyte (#86)
- rules.go: add exprUnparen rule @quasilyte (#85)
Bug fixes
- fix bug in types.Identical rule @orsinium (#95)
- Drop always true statement @orsinium (#97)
- ruleguard: unquote the pattern string properly @quasilyte (#73)
- ruleguard: handle *ast.ExprStmt during the filtering @quasilyte (#69)
Docs
- dsl/fluent: improve Var.Type doc @quasilyte (#81)
- https://go-ruleguard.github.io/by-example/
v0.2.0: start using Go modules (#67)
Now with Go modules.
The v0.1.4
introduced the backward-incompatible change.
It was intended to be a minor version bump, but oh well.
Multi rule sets support
- -rules now support multiple rule files (comma separated list)
ruleguard
package exports a function for rule sets merging