Skip to content

Commit 0a3a59f

Browse files
committed
review: improve error messages
1 parent 83c68d6 commit 0a3a59f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/config/linters.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package config
33
import (
44
"errors"
55
"fmt"
6+
"strings"
67
)
78

89
type Linters struct {
@@ -38,12 +39,12 @@ func (l *Linters) validateAllDisableEnableOptions() error {
3839
}
3940

4041
if len(l.Disable) != 0 {
41-
return fmt.Errorf("can't combine options --disable-all and --disable %s", l.Disable[0])
42+
return fmt.Errorf("can't combine options --disable-all and --disable %s", strings.Join(l.Disable, ","))
4243
}
4344
}
4445

4546
if l.EnableAll && len(l.Enable) != 0 && !l.Fast {
46-
return fmt.Errorf("can't combine options --enable-all and --enable %s", l.Enable[0])
47+
return fmt.Errorf("can't combine options --enable-all and --enable %s", strings.Join(l.Enable, ","))
4748
}
4849

4950
return nil

0 commit comments

Comments
 (0)