etcd
etcd copied to clipboard
fix: enable gofumpt instead of gofmt linter in client
Hi @mmorel-35. Thanks for your PR.
I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/remove-area contrib /remove-area etcdctl /remove-area etcdutl /remove-area performance /remove-area robustness-testing
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 68.75%. Comparing base (
3d6ff97) to head (5c74582).
:exclamation: Current head 5c74582 differs from pull request most recent head 906247c
Please upload reports for the commit 906247c to get more accurate results.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
| Files with missing lines | Coverage Δ | |
|---|---|---|
| client/v3/client.go | 84.89% <ø> (ø) |
|
| client/v3/compare.go | 75.00% <ø> (ø) |
|
| client/v3/concurrency/mutex.go | 66.23% <ø> (+5.19%) |
:arrow_up: |
| client/v3/kv.go | 94.44% <ø> (ø) |
|
| client/v3/mirror/syncer.go | 76.74% <100.00%> (+0.55%) |
:arrow_up: |
| client/v3/retry.go | 79.31% <ø> (ø) |
|
| client/v3/retry_interceptor.go | 65.61% <ø> (ø) |
|
| client/v3/watch.go | 94.23% <ø> (+0.99%) |
:arrow_up: |
... and 19 files with indirect coverage changes
@@ Coverage Diff @@
## main #18748 +/- ##
==========================================
- Coverage 68.77% 68.75% -0.02%
==========================================
Files 420 420
Lines 35501 35502 +1
==========================================
- Hits 24416 24410 -6
- Misses 9657 9663 +6
- Partials 1428 1429 +1
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 3d6ff97...906247c. Read the comment docs.
@ahrtr, @serathius, thoughts on replacing gofmt with gofumpt?
As it is more strict than gofmt I didn't suggest it at first. That's very frequently used.
/ok-to-test
A quick question, are all the changes in this PR detected/suggested by gofumpt?
It seems a little better to apply gofumpt based on the changes in this PR.
Nothing was done manually here, I changed from gofmt to gofumpt, executed make fix-lint and provided a PR with only changes in client directory
@ahrtr,
There is no suggested assignee here. Do you know why ? Who shall be assigned then ?
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: ahrtr, ivanvc, mmorel-35
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [ahrtr]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Should we add a note in the contributor guide about using gofumpt instead of gofmt?
You can provide this in the documentation but I would recommend to just use make fix-lint before committing to apply golangci configuration.
If you want to use IDE default configuration it is usually better to move the config file to the root of the project.
To be clearer, we enable both gofmt via verify-gofmt and gofumpt via the verify-lint.
Enforce a stricter format than gofmt, while being backwards compatible. That is, gofumpt is happy with a subset of the formats that gofmt is happy with.