You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, a file without doc is reported by rule package-comments with confidence 0.2 .
but it is not check is there other files in package have doc.
I want make this rule more confident
Describe the solution you'd like
check package comment in package level
Describe alternatives you've considered
Additional context
I have build a branch for this issue
The text was updated successfully, but these errors were encountered:
Hi @okhowang@chavacava , the changes in #694 have changed the behavior of revive by default when running against single files. e.g. when you clone this repository and run the following command, it produces this error:
$ revive ./rule/package-comments.go
./rule/package-comments.go:1:1: should have a package comment
Looking in #694 at the bottom there are a few others mentioning this issue as well, who have handled it by disabling this specific linter.
I can understand that it's difficult to solve for this case since it's impossible to know if there are other files in the directory without actually looking at them, but it does seem odd to have single-file usage of revive produce errors by default without extra configuration.
There is no way to let the linter know which type of target (package/directory/file) it is checking as far as I know.
We shouldn't check package comments when lint on file level.
Is your feature request related to a problem? Please describe.
Currently, a file without doc is reported by rule
package-comments
with confidence 0.2 .but it is not check is there other files in package have doc.
I want make this rule more confident
Describe the solution you'd like
check package comment in package level
Describe alternatives you've considered
Additional context
I have build a branch for this issue
The text was updated successfully, but these errors were encountered: