forked from mgechev/revive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE mgechev#1002 - "checkPublicInterface" option for "exported" r…
…ule - to check public interface method comments
- Loading branch information
Showing
3 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Package golint comment | ||
package golint | ||
|
||
// by default code bellow is valid, | ||
// but if checkPublicInterface is switched on - it should check documentation in interfaces | ||
|
||
// Some - some interface | ||
type Some interface { | ||
// Correct - should do all correct | ||
Correct() | ||
// MATCH /comment on exported interface method Some.SemiCorrect should be of the form "SemiCorrect ..."/ | ||
SemiCorrect() | ||
NonCorrect() // MATCH /public interface method Some.NonCorrect should be commented/ | ||
} | ||
|
||
// for private interfaces it doesn't check docs anyway | ||
|
||
type somePrivate interface { | ||
AllGood() | ||
} |