File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ func (*RootCmd) statDisk(s *clistat.Statter) *clibase.Cmd {
240
240
ds , err := s .Disk (pfx , pathArg )
241
241
if err != nil {
242
242
if os .IsNotExist (err ) {
243
- // fmt.Errorf produces a more concise error.
243
+ //nolint:gocritic // fmt.Errorf produces a more concise error.
244
244
return fmt .Errorf ("not found: %q" , pathArg )
245
245
}
246
246
return err
Original file line number Diff line number Diff line change @@ -51,8 +51,12 @@ func xerrors(m dsl.Matcher) {
51
51
m .Import ("fmt" )
52
52
m .Import ("golang.org/x/xerrors" )
53
53
54
- m .Match ("fmt.Errorf($*args)" ).
55
- Suggest ("xerrors.New($args)" ).
54
+ m .Match ("fmt.Errorf($arg)" ).
55
+ Suggest ("xerrors.New($arg)" ).
56
+ Report ("Use xerrors to provide additional stacktrace information!" )
57
+
58
+ m .Match ("fmt.Errorf($arg1, $*args)" ).
59
+ Suggest ("xerrors.Errorf($arg1, $args)" ).
56
60
Report ("Use xerrors to provide additional stacktrace information!" )
57
61
58
62
m .Match ("errors.$_($msg)" ).
You can’t perform that action at this time.
0 commit comments