diff --git a/pkg/commands/help.go b/pkg/commands/help.go index 9fb2a87767d7..fed59c126824 100644 --- a/pkg/commands/help.go +++ b/pkg/commands/help.go @@ -44,6 +44,10 @@ func printLinterConfigs(lcs []linter.Config) { } func (e Executor) executeLintersHelp(cmd *cobra.Command, args []string) { + if len(args) != 0 { + e.log.Fatalf("Usage: golangci-lint help linters") + } + var enabledLCs, disabledLCs []linter.Config for _, lc := range e.DBManager.GetAllSupportedLinterConfigs() { if lc.EnabledByDefault { diff --git a/pkg/commands/linters.go b/pkg/commands/linters.go index fada8084e82b..22500489f3bb 100644 --- a/pkg/commands/linters.go +++ b/pkg/commands/linters.go @@ -31,6 +31,10 @@ func IsLinterInConfigsList(name string, linters []linter.Config) bool { } func (e *Executor) executeLinters(cmd *cobra.Command, args []string) { + if len(args) != 0 { + e.log.Fatalf("Usage: golangci-lint linters") + } + enabledLCs, err := e.EnabledLintersSet.Get() if err != nil { log.Fatalf("Can't get enabled linters: %s", err)