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

Merged
merged 1 commit into from
Oct 4, 2024

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

codecov-commenter commented Sep 26, 2024

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.77%. Comparing base (c1976a6) to head (9142964).

Current head 9142964 differs from pull request most recent head 3654d03

Please upload reports for the commit 3654d03 to get more accurate results.

❗ 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% <100.00%> (ø)

... and 28 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #18645      +/-   ##
==========================================
- Coverage   68.78%   68.77%   -0.02%     
==========================================
  Files         420      420              
  Lines       35539    35539              
==========================================
- Hits        24446    24442       -4     
- Misses       9665     9668       +3     
- 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 data
Powered by Codecov. Last update c1976a6...3654d03. 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

@ivanvc
Copy link
Member Author

ivanvc commented Oct 3, 2024

/retest

@ivanvc
Copy link
Member Author

ivanvc commented Oct 4, 2024

/retest

@ivanvc ivanvc requested review from serathius and ahrtr October 4, 2024 02:48
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

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

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:
  • OWNERS [ahrtr,jmhbnz,serathius]

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

@serathius serathius merged commit 4e57e47 into etcd-io:main Oct 4, 2024
37 checks passed
@ivanvc ivanvc deleted the api-unexported-return branch October 4, 2024 14:36
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.

6 participants