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

Add godoc linter #7444

Open
dfawley opened this issue Jul 26, 2024 · 8 comments
Open

Add godoc linter #7444

dfawley opened this issue Jul 26, 2024 · 8 comments
Assignees
Labels
Status: Help Wanted Type: Meta Github repo, process, etc

Comments

@dfawley
Copy link
Member

dfawley commented Jul 26, 2024

Since removing golint, we've had numerous occasions of missing docstrings. This seems like the consensus replacement for golint: https://github.com/mgechev/revive -- we should set it up to at least check the docstrings.

@dfawley dfawley added the Type: Meta Github repo, process, etc label Jul 26, 2024
@purnesh42H purnesh42H self-assigned this Jul 30, 2024
@purnesh42H
Copy link
Contributor

purnesh42H commented Aug 2, 2024

Before we enforce revive, we need to fix existing lint issues caught in #7472 as part of vet check.

Its fine to change several files in a single PR if they all fix one type of issue or are otherwise related. However, be reasonable and try to keep the PRs small enough to make it not take a long time to review and avoid merge conflicts.

@dfawley dfawley closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
@dfawley dfawley reopened this Aug 5, 2024
@janardhanvissa
Copy link

@purnesh42H Please assign me this issue.

@dfawley dfawley assigned janardhanvissa and unassigned purnesh42H Aug 9, 2024
@janardhanvissa
Copy link

@purnesh42H Right now, In the tests (vet) I'm getting like don't use an underscore in package name https://revive.run/r#var-naming.
It's not expecting underscore but by default as it's generating from the proto file like ("google.golang.org/grpc/reflection/test/grpc_testing_not_regenerate"). So, what need to do for further. Please suggest.

@janardhanvissa
Copy link

janardhanvissa commented Aug 12, 2024

@purnesh42H Fixed some of the godoc-linter issues. Please review and let me know if any changes are required. Please find the PR below.
#7501

@purnesh42H purnesh42H removed the P2 label Aug 13, 2024
@janardhanvissa
Copy link

@purnesh42H Fixed linter issues for superfluous-else, increment-decrement, indent-error-flow, var-declaration. Please review the changes.

janardhanvissa#1

@janardhanvissa
Copy link

janardhanvissa commented Aug 16, 2024

@purnesh42H Fixed below godoc linter issues. Please find the PRs below. Please let me know if any changes are required.

15 redefines-builtin-id
8 package-comments
8 empty-block
6 var-declaration
3 indent-error-flow
2 increment-decrement
1 superfluous-else

janardhanvissa#1
janardhanvissa#2
janardhanvissa#3

@purnesh42H
Copy link
Contributor

@purnesh42H Fixed linter issues for superfluous-else, increment-decrement, indent-error-flow, var-declaration. Please review the changes.

janardhanvissa#1

Thanks. LGTM. Please open the. PR in main repo.

@janardhanvissa
Copy link

@purnesh42H Fixed below godoc linter issues and raised a PR to main repo.

6 var-declaration
3 indent-error-flow
2 increment-decrement
1 superfluous-else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Help Wanted Type: Meta Github repo, process, etc
Projects
None yet
Development

No branches or pull requests

3 participants