govpp icon indicating copy to clipboard operation
govpp copied to clipboard

linter: fixes for staticcheck

Open sknat opened this issue 3 years ago • 1 comments

As golint is now deprecated, this patch proposes to switch to staticcheck [0] as an alternative, in addition to go vet. This patch contains fixes addressing the linter's reported issues, with two added exceptions :

  • The MemoryStats deprectated fields are still for us to update
  • In gen_encoding.go we need to add an extra comment to account for the unused variable. This is probably worth addressing in another patch to not generate a variable we don't use.

[0] https://staticcheck.io/

Signed-off-by: Nathan Skrzypczak [email protected] Change-Id: I0562f290fb908bc610c44d675e21e466d0badc27

sknat avatar Aug 11 '22 13:08 sknat

It seems pointless to add special comments to the generated files. The tool should ignore the generated files entirely.

ondrej-fabry avatar Aug 11 '22 13:08 ondrej-fabry

Removed the changes in the generated code for now & updated the patch

sknat avatar Sep 22 '22 13:09 sknat