Skip to content
Myr

Remove fully inactivated linters (#2148)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* Remove fully inactivated linters Currently golangci-lint fails with these errors: ERRO [linters_context] golint: This linter is fully inactivated: it will not produce any reports. ERRO [linters_context] interfacer: This linter is fully inactivated: it will not produce any reports. ERRO [linters_context] maligned: This linter is fully inactivated: it will not produce any reports. I could not find any docs explaining what "fully inactivated" mean, but based this PR[1] it seems that these linters do nothing now. Removing the linters fixes this issue without changing linting, as they did not produce any report. Looking in the linters docs[2] I did not find a replacement for "interfacer" and "malinged" linters. "stylecheck" seems to be a replacement for "golint", but we need to fix the code to enable it. [1] https://github.com/golangci/golangci-lint/pull/4436 [2] https://golangci-lint.run/usage/linters/ * Add stylecheck linter, replacement for golint This revealed 2 capitalized error messages. https://golangci-lint.run/usage/linters/#stylecheck

authored by Nir Soffer · committed by GitHub · parent 5c2c1d6 · Browse files · 3 files+3 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • https: //golangci-lint.run/usage/linters/#stylecheck

Diff stats

3 files+3 added−6 removed

  • other:+3 added−6 removed

3 files+3 added−6 removed

modified:.golangci.yml+1 added-4 removed
modified:command.go+1 added-1 removed
873 unmodified lines
874}875876func (c *Command) execute(a []string) (err error) {877 if c == nil {878 return fmt.Errorf("Called Execute() on a nil Command")878 return fmt.Errorf("called Execute() on a nil Command")879 }880881 if len(c.Deprecated) > 0 {882 c.Printf("Command %q is deprecated, %s\n", c.Name(), c.Deprecated)
1015 unmodified lines
modified:completions.go+1 added-1 removed
296 unmodified lines
297 finalCmd, finalArgs, err = rootCmd.Find(trimmedArgs)298 }299 if err != nil {300 // Unable to find the real command. E.g., <program> someInvalidCmd <TAB>301 return c, []string{}, ShellCompDirectiveDefault, fmt.Errorf("Unable to find a command for arguments: %v", trimmedArgs)301 return c, []string{}, ShellCompDirectiveDefault, fmt.Errorf("unable to find a command for arguments: %v", trimmedArgs)302 }303 finalCmd.ctx = c.ctx304305 // These flags are normally added when `execute()` is called on `finalCmd`,
634 unmodified lines