Linter fixes #2

Merged
realloc merged 1 commit from fyrchik/basic:linter-fixes into master 2023-07-26 21:08:06 +00:00
Owner

All mandatory linters either catch bugs, enforce common codestyle (gofmt, goimports) or are useful and quite easy to follow (exhaustive, whitespace).

For extra linters:

  • godot feels context dependent (we know it has some "false" positives)
  • predeclared is ok, but may seem optional -- short-lived variables could be named better (like I loathe writing ln for length instead of len).
  • reassign -- sometimes can (?) be necessary
  • containedctx is ok, but sometimes hard to fix in already existing code and can be violated sometimes (gRPC is a prominent example)
  • funlen, gocognit -- both of them a mandatory to me, but I believe different settings can be tolerated.
  • contextcheck -- hard to fix, sometimes has false positives (and sometimes doesn't catch everything we would like).

I would actually leave only containedctx, godot and contextcheck in the extra section: for other linters it is easy to find proper settings or add an exception with a comment.

All mandatory linters either catch bugs, enforce common codestyle (gofmt, goimports) or are useful and quite easy to follow (exhaustive, whitespace). For extra linters: - `godot` feels context dependent (we know it has some "false" positives) - `predeclared` is ok, but may seem optional -- short-lived variables could be named better (like I loathe writing `ln` for length instead of `len`). - `reassign` -- sometimes can (?) be necessary - `containedctx` is ok, but sometimes hard to fix in already existing code and can be violated _sometimes_ (gRPC is a prominent example) - `funlen`, `gocognit` -- both of them a mandatory to me, but I believe different settings can be tolerated. - `contextcheck` -- hard to fix, sometimes has false positives (and sometimes doesn't catch everything we would like). I would actually leave only `containedctx`, `godot` and `contextcheck` in the extra section: for other linters it is easy to find proper settings or add an exception with a comment.
fyrchik requested review from storage-core-committers 2023-06-25 09:58:29 +00:00
fyrchik requested review from storage-core-developers 2023-06-25 09:58:29 +00:00
fyrchik requested review from storage-services-committers 2023-06-25 09:58:29 +00:00
fyrchik requested review from storage-services-developers 2023-06-25 09:58:30 +00:00
fyrchik force-pushed linter-fixes from 0c05820112 to 6b0d4bbb8a 2023-06-25 09:58:42 +00:00 Compare
fyrchik force-pushed linter-fixes from 6b0d4bbb8a to 3b9c32fc1d 2023-06-25 09:59:09 +00:00 Compare
acid-ant approved these changes 2023-06-26 05:58:41 +00:00
alexvanin approved these changes 2023-06-26 06:20:57 +00:00
alexvanin left a comment
Owner

LGTM

LGTM
dkirillov approved these changes 2023-06-26 06:24:30 +00:00
fyrchik requested review from realloc 2023-06-26 09:20:18 +00:00
realloc approved these changes 2023-06-28 12:53:15 +00:00
realloc merged commit 3b9c32fc1d into master 2023-06-28 12:53:28 +00:00
realloc deleted branch linter-fixes 2023-06-28 12:53:29 +00:00
Sign in to join this conversation.
No description provided.