Linter fixes #2
Labels
No labels
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/basic#2
Loading…
Reference in a new issue
No description provided.
Delete branch "fyrchik/basic:linter-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 writingln
for length instead oflen
).reassign
-- sometimes can (?) be necessarycontainedctx
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
andcontextcheck
in the extra section: for other linters it is easy to find proper settings or add an exception with a comment.0c05820112
to6b0d4bbb8a
6b0d4bbb8a
to3b9c32fc1d
LGTM