Make linter stricker #148

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:feat/linters into master 2023-07-26 21:07:56 +00:00
8 changed files with 10 additions and 1 deletions

View file

@ -61,5 +61,6 @@ linters:
- containedctx
- funlen
- gocognit
- contextcheck
disable-all: true
fast: false

View file

@ -41,6 +41,7 @@ func (s *Server) DropObjects(_ context.Context, req *control.DropObjectsRequest)
prm.WithForceRemoval()
prm.WithAddress(addrList[i])
//nolint: contextcheck
_, err := s.s.Delete(prm)
if err != nil && firstErr == nil {
firstErr = err

View file

@ -107,7 +107,7 @@ func (exec *execCtx) HeadObject(ctx context.Context, id oid.ID) (*objectSDK.Obje
w := NewSimpleObjectWriter()
prm.SetHeaderWriter(w)
//nolint: contextcheck
err := exec.svc.Head(exec.context(), prm)
if err != nil {
@ -128,6 +128,7 @@ func (exec *execCtx) GetObject(ctx context.Context, id oid.ID, rng *objectSDK.Ra
p.addr.SetContainer(exec.containerID())
p.addr.SetObject(id)
//nolint: contextcheck
statusError := exec.svc.get(exec.context(), p.commonPrm, withPayloadRange(rng))
if statusError.err != nil {

View file

@ -78,6 +78,7 @@ func (s *Service) get(ctx context.Context, prm commonPrm, opts ...execOption) st
exec.setLogger(s.log)
//nolint: contextcheck
exec.execute()
return exec.statusError

View file

@ -43,6 +43,7 @@ func (exec *execCtx) processNode(ctx context.Context, info client.NodeInfo) bool
// has already been streamed to the requesting party
if obj != nil {
exec.collectedObject = obj
//nolint: contextcheck
exec.writeCollectedObject()
}
case errors.As(err, &errRemoved):

View file

@ -18,6 +18,7 @@ func (s *Service) Search(ctx context.Context, prm Prm) error {
exec.setLogger(s.log)
//nolint: contextcheck
exec.execute()
return exec.statusError.err

View file

@ -81,6 +81,7 @@ func (p *Policer) processObject(ctx context.Context, addrWithType objectcore.Add
prm.MarkAsGarbage(addrWithType.Address)
prm.WithForceRemoval()
//nolint: contextcheck
_, err := p.jobQueue.localStorage.Inhume(prm)
if err != nil {
p.log.Error("could not inhume object with missing container",
@ -124,6 +125,7 @@ func (p *Policer) processObject(ctx context.Context, addrWithType objectcore.Add
default:
}
//nolint: contextcheck
p.processNodes(c, addrWithType, nn[i], policy.ReplicaNumberByIndex(i), checkedNodes)
}

View file

@ -94,6 +94,7 @@ func (s *Service) replicationWorker() {
func (s *Service) replicateLoop(ctx context.Context) {
for i := 0; i < s.replicatorWorkerCount; i++ {
//nolint: contextcheck
go s.replicationWorker()
go s.localReplicationWorker()
}