Skip to content

Linters worth adding to the gate #62

Description

@vishr

.golangci.yml states that the gate should be green from the first run and should name what it does not yet check. These five are close to that bar today:

Linter Findings Non-test
errorlint 6 4
noctx 9 3
copyloopvar 1 1
unconvert 3 3
intrange 4 2

errorlint and noctx overlap with items 1, 9, and the *ssh.ExitError assertion above, so they would have caught real findings rather than style. Reproduce with:

golangci-lint run --no-config --default=none \
  --enable=errorlint,noctx,copyloopvar,unconvert,intrange ./...

contextcheck, gocritic, and prealloc were also run; their findings are style or false positives against this codebase's conventions and are not included here.


Split out of #50 as item 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions