Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: address revive unexported-return issues #18645

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ivanvc
Copy link
Member

@ivanvc ivanvc commented Sep 26, 2024

This is the first pull request aiming to enable the unexported-return revive lint rule from golangci-lint.

The aim is to ensure that the structs returned from exported functions are exported, too.

In this pull request, the following structs are now exported:

  • etcdserverpb.TxnRequestStringer, previously txnRequestStringer, as it is returned by the exported function NewLoggableTxnRequest().
  • etcdserverpb.LoggablePutRequest, previously loggablePutRequest, as it is returned by the exported function NewLoggablePutRequest().

Part of #18370.

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 68.79%. Comparing base (c86c93c) to head (063a601).

Current head 063a601 differs from pull request most recent head 3e5173b

Please upload reports for the commit 3e5173b to get more accurate results.

Files with missing lines Patch % Lines
api/etcdserverpb/raft_internal_stringer.go 75.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
Files with missing lines Coverage Δ
api/etcdserverpb/raft_internal_stringer.go 81.72% <75.00%> (ø)

... and 20 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #18645      +/-   ##
==========================================
+ Coverage   68.77%   68.79%   +0.01%     
==========================================
  Files         420      420              
  Lines       35535    35535              
==========================================
+ Hits        24438    24445       +7     
+ Misses       9668     9663       -5     
+ Partials     1429     1427       -2     

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 c86c93c...3e5173b. Read the comment docs.

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 @ivanvc

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

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

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

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