Skip to content

Conversation

@mmorel-35
Copy link
Contributor

@mmorel-35 mmorel-35 commented Jan 9, 2025

Description

early-return: In Go it is idiomatic to minimize nesting statements, a typical example is to avoid if-then-else constructions.

superfluous-else: To improve the readability of code, it is recommended to reduce the indentation as much as possible. This rule highlights redundant else-blocks that can be eliminated from the code.

@codecov
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 52.94118% with 8 lines in your changes missing coverage. Please review.

Project coverage is 68.74%. Comparing base (ecd7cfc) to head (10d7cea).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
server/etcdserver/api/v2store/store.go 33.33% 2 Missing and 2 partials ⚠️
etcdctl/ctlv3/command/check.go 0.00% 3 Missing ⚠️
etcdctl/ctlv3/ctl.go 0.00% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
pkg/flags/selective_string.go 100.00% <100.00%> (ø)
server/etcdserver/cluster_util.go 66.17% <100.00%> (-0.13%) ⬇️
server/proxy/grpcproxy/watcher.go 91.83% <100.00%> (-0.17%) ⬇️
server/storage/mvcc/watchable_store.go 93.89% <100.00%> (-0.02%) ⬇️
etcdctl/ctlv3/ctl.go 0.00% <0.00%> (ø)
etcdctl/ctlv3/command/check.go 0.00% <0.00%> (ø)
server/etcdserver/api/v2store/store.go 83.87% <33.33%> (-0.05%) ⬇️

... and 24 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #19152      +/-   ##
==========================================
- Coverage   68.76%   68.74%   -0.02%     
==========================================
  Files         420      420              
  Lines       35650    35641       -9     
==========================================
- Hits        24513    24500      -13     
+ Misses       9714     9706       -8     
- Partials     1423     1435      +12     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ecd7cfc...10d7cea. Read the comment docs.

Signed-off-by: Matthieu MOREL <[email protected]>

Co-authored-by: Iván Valdés Castillo <[email protected]>
@mmorel-35 mmorel-35 requested a review from ivanvc January 18, 2025 08:45
Copy link
Member

@jmhbnz jmhbnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thanks @mmorel-35

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, jmhbnz, mmorel-35

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr ahrtr merged commit 88b3938 into etcd-io:main Jan 19, 2025
34 checks passed
@mmorel-35 mmorel-35 deleted the revive/superfluous-else branch January 19, 2025 09:51
@ivanvc ivanvc mentioned this pull request May 28, 2025
4 tasks
@ivanvc ivanvc mentioned this pull request Jul 6, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants