mgechev / revive

🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
https://revive.run
MIT License
4.68k stars 268 forks source link

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

Open comdiv opened 6 days ago

comdiv commented 6 days ago

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

chavacava commented 3 days ago

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