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

rule exported add checkPublicInterface option to check documentation in public interface definition #1002

Open
comdiv opened this issue Jun 28, 2024 · 4 comments

Comments

@comdiv
Copy link
Contributor

comdiv commented Jun 28, 2024

For now this code is valid:

// Some - some interface
type Some interface {
     // Correct - should do all correct
     Correct()
     // not valid format of comment
     SemiCorrect()
     NonCorrect() // no documentation
}

suggest to add checkPublicInterface to exported rule to check documentation on interface method declaration,
so here SemiCorrect() has not valid comment, and NonCorrect() doesn't have it at all

comdiv added a commit to comdiv/revive that referenced this issue Jun 28, 2024
…ule - to check public interface method comments
comdiv added a commit to comdiv/revive that referenced this issue Jun 28, 2024
comdiv added a commit to comdiv/revive that referenced this issue Jun 28, 2024
comdiv added a commit to comdiv/revive that referenced this issue Jun 28, 2024
@chavacava
Copy link
Collaborator

Hi @comdiv, thank you for reporting the issue and opening a PR (I'll check it in the next days)

chavacava pushed a commit that referenced this issue Jul 30, 2024
… check documentation on public methods on public interfaces (#1003)

* [var-naming] handle private uppercased const

* FEATURE #1002 - "checkPublicInterface" option for "exported" rule - to check public interface method comments

* fix exported #1002 for ast.Ident

* fix exported #1002 for ast.Ident 2

* go fmt applyed

* #1002 update documentation on `exported` rule

* refactor `exported` rule configuration logic

* test and review fixes

---------

Co-authored-by: fregin <[email protected]>
@arxeiss
Copy link

arxeiss commented Sep 3, 2024

I see the #1003 was merged, however no release was made since then. Can you please release new version so we can use this feature with GolangCI-Lint?

Thank you

@zignd
Copy link

zignd commented Sep 9, 2024

@mgechev, @chavacava, or other collaborators. Do you have any plans for when to release a new version so that we can use this new flag?

@arxeiss
Copy link

arxeiss commented Oct 9, 2024

Based on https://github.com/mgechev/revive/releases/tag/v1.4.0 it should be released.
I guess this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants