slsa-verifier icon indicating copy to clipboard operation
slsa-verifier copied to clipboard

Enable Go linters

Open ianlewis opened this issue 2 years ago • 4 comments

The following unchecked golangci-lint linters are currently generating issues and disabled. We need to enable them and fix the issues encountered:

  • [x] deadcode (#456)
  • [ ] errcheck
  • [ ] gci
  • [ ] gocognit
  • [x] gocritic (#456)
  • [x] godot (#456)
  • [ ] goerr113
  • [ ] gofumpt
  • [ ] gosec
  • [ ] govet
  • [ ] lll
  • [x] misspell (#456)
  • [ ] nestif
  • [ ] paralleltest
  • [ ] revive
  • [x] staticcheck (#456)
  • [ ] stylecheck
  • [x] thelper (#456)
  • [x] unconvert (#456)
  • [ ] wrapcheck

ianlewis avatar Nov 25 '22 02:11 ianlewis

deadcode is deprecated and replaced by unused. just FYI

asraa avatar Jan 25 '23 16:01 asraa

deadcode is deprecated and replaced by unused. just FYI

Yeah, we can just remove it and varcheck (though I see you removed it already) since we already have unused enabled.

ianlewis avatar Jan 25 '23 23:01 ianlewis

Yeah, we can just remove it and varcheck (though I see you removed it already) since we already have unused enabled.

Weirdly enough, it still seemed to be working. I removed some deadcode because of it's alert, but when I remove the deadcode check and introduce it again, it doesn't complain. It seems to be triggering either some form of unused w/ deadcode, OR it is still working but is staged to be deprecated. I'll investigate if I can remove it in a further PR

asraa avatar Jan 26 '23 15:01 asraa

Removed deadcode here: https://github.com/slsa-framework/slsa-verifier/pull/572/files#diff-6179837f7df53a6f05c522b6b7bb566d484d5465d9894fb04910dd08bb40dcc9L24

ianlewis avatar May 10 '23 01:05 ianlewis