mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: fix ruleguard xerrors rules (#8967)
This commit is contained in:
+6
-2
@@ -51,8 +51,12 @@ func xerrors(m dsl.Matcher) {
|
||||
m.Import("fmt")
|
||||
m.Import("golang.org/x/xerrors")
|
||||
|
||||
m.Match("fmt.Errorf($*args)").
|
||||
Suggest("xerrors.New($args)").
|
||||
m.Match("fmt.Errorf($arg)").
|
||||
Suggest("xerrors.New($arg)").
|
||||
Report("Use xerrors to provide additional stacktrace information!")
|
||||
|
||||
m.Match("fmt.Errorf($arg1, $*args)").
|
||||
Suggest("xerrors.Errorf($arg1, $args)").
|
||||
Report("Use xerrors to provide additional stacktrace information!")
|
||||
|
||||
m.Match("errors.$_($msg)").
|
||||
|
||||
Reference in New Issue
Block a user