etcd-io / etcd

Distributed reliable key-value store for the most critical data of a distributed system
https://etcd.io
Apache License 2.0
47.5k stars 9.74k forks source link

Enable `unexported-return` linter rule #18370

Open ivanvc opened 2 months ago

ivanvc commented 2 months ago

What would you like to be added?

There are two remaining linter rules that we haven't enabled but are left as TODO (./tools/.golangci.yaml): exported and unexported-return. The former will have significant changes to exported functions and interfaces. The latter, even though it impacts exported structs, it's for the better (it exposes them without breaking client implementations).

I suggest breaking the pull requests into small tasks like we did on #17578.

The following modules have warnings to be addressed:

Refer to the attached log file with the result from KEEP_GOING_MODULE=true make verify-lint.

Why is this needed?

To improve the quality of the code.

ivanvc commented 2 months ago

/assign @thedtripp

k8s-ci-robot commented 2 months ago

@ivanvc: GitHub didn't allow me to assign the following users: thedtripp.

Note that only etcd-io members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see the contributor guide

In response to [this](https://github.com/etcd-io/etcd/issues/18370#issuecomment-2253260360): >/assign @thedtripp Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
ivanvc commented 2 months ago

@jmhbnz, could this be a bug? @thedtripp is already part of our org :thinking:

Edit: I think it's because he doesn't belong to any teams. Should he open a pull request to add himself to the members? (https://github.com/kubernetes/org/blob/main/config/etcd-io/sig-etcd/teams.yaml#L77)

thedtripp commented 2 months ago

I'd like to work on this issue.

thedtripp commented 2 months ago

/assign @thedtripp

jmhbnz commented 2 months ago

@jmhbnz, could this be a bug? @thedtripp is already part of our org 🤔

Edit: I think it's because he doesn't belong to any teams. Should he open a pull request to add himself to the members? (https://github.com/kubernetes/org/blob/main/config/etcd-io/sig-etcd/teams.yaml#L77)

Good spotting - Yes this should be tidied up, @thedtripp please feel free to raise a kubernetes/org pr to add yourself to the members team 🙏🏻

thedtripp commented 2 months ago

@jmhbnz, could this be a bug? @thedtripp is already part of our org 🤔 Edit: I think it's because he doesn't belong to any teams. Should he open a pull request to add himself to the members? (https://github.com/kubernetes/org/blob/main/config/etcd-io/sig-etcd/teams.yaml#L77)

Good spotting - Yes this should be tidied up, @thedtripp please feel free to raise a kubernetes/org pr to add yourself to the members team 🙏🏻

I'll raise that PR in the next few days. Thanks!

jmhbnz commented 2 days ago

Discussed during sig-etcd triage meeting. There are a number of modules that need updating, so we could break this up into smaller chunks and do it one module at a team.

@thedtripp let us know which module you will focus on and we can assign out the others.

ivanvc commented 2 days ago

I'll do the first one (api) to set an example of what should be done with this issue.