Add contextcheck linter #112

Closed
opened 2023-03-08 23:34:38 +00:00 by snegurochka · 0 comments
Member

Original issue: https://github.com/nspcc-dev/neofs-node/issues/1911

Carefully check each case, I think many of them are worth fixing.

dzeta@wpc ~/r/neofs-node (add-linters)> golangci-lint run ./...
pkg/services/tree/replicator.go:76:3        contextcheck  Function `replicationWorker->replicationWorker$1` should pass the context parameter
pkg/network/cache/multi.go:109:16           contextcheck  Function `createForAddress->Dial->Balance->SendUnary->Init->setNeoFSAPIServer` should pass the context parameter
pkg/services/object/get/v2/util.go:438:35   contextcheck  Function `HeadObject->SendUnary->Init` should pass the context parameter
pkg/services/policer/check.go:81:44         contextcheck  Function `Inhume->Inhume$1` should pass the context parameter
pkg/services/policer/check.go:125:17        contextcheck  Function `processNodes->isClientErrMaintenance->processNodes$1` should pass the context parameter
cmd/neofs-node/config.go:903:57             contextcheck  Function `Reload->addShard->Init->init->updateObjectCounter->hasWriteCache->needRefillMetabase->GetMode->createShard->removeShards->calculateShardID` should pass the context parameter
pkg/services/object/get/get.go:81:14        contextcheck  Function `execute->analyzeStatus->executeLocal` should pass the context parameter
cmd/neofs-cli/internal/client/sdk.go:82:24  contextcheck  Function `Dial->Balance->SendUnary->Init->setNeoFSAPIServer` should pass the context parameter
pkg/services/control/server/gc.go:44:23     contextcheck  Function `Delete->Delete$1` should pass the context parameter
pkg/services/object/search/search.go:21:14  contextcheck  Function `execute->analyzeStatus` should pass the context parameter
Original issue: https://github.com/nspcc-dev/neofs-node/issues/1911 Carefully check each case, I think many of them are worth fixing. ``` dzeta@wpc ~/r/neofs-node (add-linters)> golangci-lint run ./... pkg/services/tree/replicator.go:76:3 contextcheck Function `replicationWorker->replicationWorker$1` should pass the context parameter pkg/network/cache/multi.go:109:16 contextcheck Function `createForAddress->Dial->Balance->SendUnary->Init->setNeoFSAPIServer` should pass the context parameter pkg/services/object/get/v2/util.go:438:35 contextcheck Function `HeadObject->SendUnary->Init` should pass the context parameter pkg/services/policer/check.go:81:44 contextcheck Function `Inhume->Inhume$1` should pass the context parameter pkg/services/policer/check.go:125:17 contextcheck Function `processNodes->isClientErrMaintenance->processNodes$1` should pass the context parameter cmd/neofs-node/config.go:903:57 contextcheck Function `Reload->addShard->Init->init->updateObjectCounter->hasWriteCache->needRefillMetabase->GetMode->createShard->removeShards->calculateShardID` should pass the context parameter pkg/services/object/get/get.go:81:14 contextcheck Function `execute->analyzeStatus->executeLocal` should pass the context parameter cmd/neofs-cli/internal/client/sdk.go:82:24 contextcheck Function `Dial->Balance->SendUnary->Init->setNeoFSAPIServer` should pass the context parameter pkg/services/control/server/gc.go:44:23 contextcheck Function `Delete->Delete$1` should pass the context parameter pkg/services/object/search/search.go:21:14 contextcheck Function `execute->analyzeStatus` should pass the context parameter ```
dstepanov-yadro was assigned by fyrchik 2023-03-23 08:50:48 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#112
No description provided.