refactoring: make unused linter stricker #1388
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
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/frostfs-node#1388
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:refactoring/drop_unused"
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?
Enable some unused additional parameters: https://golangci-lint.run/usage/linters/#unused
The most important false positive case is structs used as map keys, so they are marked with
nolint
annotations.unused
linter stricker 054d9ea7f3cmode
441e31ec1d054996c217
to78b0278746
@ -8,3 +8,3 @@
type RawEntry struct {
key, value []byte
key []byte
@a-savchuk please review
@ -20,4 +16,2 @@
traverseOpts []placement.Option
relay func(context.Context, client.NodeInfo, client.MultiAddressClient) error
@aarifullin please review. Looks like this could be deleted after
Patch
related refactoringsIs it possible to suppress check for
cmode
forir
?78b0278746
to6da36ff7fc
Ok
6da36ff7fc
toba3d1c5a41
@ -20,4 +16,2 @@
traverseOpts []placement.Option
relay func(context.Context, client.NodeInfo, client.MultiAddressClient) error
Oh, no. My refactoring was incorrect. Please, do not apply this change until my fix is merged
ba3d1c5a41
tob5a29c3e34
7a4f1fe9ee
toaa763c6bcd
@ -7,13 +7,13 @@ import (
)
type RawEntry struct {
key, value []byte
For a raw entry, as for any entry, we wanna be able to see its dump (see
DetailedString
method). Both fieldskey
andvalue
are intended to be shown in a dump view. Could we ignore the lint warning here? or should we do something trickier like thisand add an additional comment to describe that decision?
fixed
@ -57,7 +57,5 @@ func DefaultRecordParser(key, value []byte) (common.SchemaEntry, common.Parser,
r.addr.SetContainer(cnr)
r.addr.SetObject(obj)
r.data = value[:]
Same comment as the one for
RawEntry
. We should keep that field forDetailedString
methodfixed
@ -16,7 +16,6 @@ type (
DefaultRecord struct {
addr oid.Address
data []byte
Same comment as the one for
RawEntry
. We should keep that field forDetailedString
methodfixed
aa763c6bcd
to62c8e6554c
New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
unused
linter report withfield-writes-are-uses
setting disabled #1100