-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: add file-length-limit
rule
#1072
Conversation
8e4a158
to
a2eb931
Compare
4713d65
to
d33cc0e
Compare
d33cc0e
to
f74c8fe
Compare
For record, archives and context The following linter made by @DanilXO has been merged into golangci-lint https://github.com/DanilXO/filen It also was discussed here |
SkipBlankLines is an interesting addition. I'll add it to my linter too. I was thinking about revive as a place to add this, but I liked the idea of golangci-lint with little disabling linters better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alexandear. I've left some comments. Please also add documentation to the Name method to remove the lint warn.
IMO the default max must be |
@chavacava Resolved your comments. But I choose |
568deb5
to
d92f14d
Compare
d92f14d
to
2008ca4
Compare
This PR adds a new rule
file-length-limit
.The rule is inspired on the eslint rule max-length.
This rule has options:
max
(default0
) enforces a maximum number of lines in a file,0
means the rule is disabled;skipBlankLines
(defaultfalse
) iftrue
ignore lines made up purely of whitespace;skipComments
(defaultfalse
) iftrue
ignore lines containing just comments.