Add useStrconv linter #618

Merged
fyrchik merged 2 commits from achuprov/frostfs-node:nofmt into master 2023-08-21 07:14:52 +00:00
Member

Introduced a linter, following Uber Go Style Guide, that recommends using strconv over fmt

Introduced a linter, following [Uber Go Style Guide](https://github.com/uber-go/guide/blob/master/style.md#prefer-strconv-over-fmt), that recommends using `strconv` over `fmt`
Author
Member

After TrueCloudLab/linters#10 is merged, please restart the tests and then merge

After https://git.frostfs.info/TrueCloudLab/linters/pulls/10 is merged, please restart the tests and then merge
achuprov changed title from Add nofmt linter to Add useStrconv linter 2023-08-17 13:35:03 +00:00
dstepanov-yadro approved these changes 2023-08-18 03:35:34 +00:00
dstepanov-yadro requested review from storage-core-committers 2023-08-18 03:35:48 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-08-18 03:35:48 +00:00
dstepanov-yadro approved these changes 2023-08-18 03:40:54 +00:00
acid-ant approved these changes 2023-08-18 04:15:19 +00:00
achuprov force-pushed nofmt from f5b5e26e44 to 2cc61c78f8 2023-08-18 13:16:35 +00:00 Compare
fyrchik reviewed 2023-08-18 13:33:18 +00:00
@ -292,3 +293,3 @@
attribute.String("container_id", cid.EncodeToString()),
attribute.String("tree_id", treeID),
attribute.String("height", fmt.Sprintf("%d", height)),
attribute.String("height", strconv.FormatUint(height, 10)),
Owner

Unrelated to this PR:
Actually, I am wondering -- why don't we use attribute.Int64 here?
I see It should be signed by the spec 9e6a3de19c/specification/common/common.md (attributes) -- because of this?

cc @dstepanov-yadro

Unrelated to this PR: Actually, I am wondering -- why don't we use `attribute.Int64` here? I see It _should_ be signed by the spec https://github.com/open-telemetry/opentelemetry-specification/blob/9e6a3de19cb3db983b2e4d56b37ec6313fd4ffc6/specification/common/common.md#attributes -- because of this? cc @dstepanov-yadro
fyrchik approved these changes 2023-08-18 13:33:33 +00:00
fyrchik merged commit 4d9a6c07fb into master 2023-08-21 07:14:52 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
4 participants
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#618
No description provided.