-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add --consecutive option #70
base: master
Are you sure you want to change the base?
Conversation
Resolves agda#68 Add an option to check for maximum count of consecutive empty lines. If zero, unlimited cmount is allowed. If 1, there cannot be empty lines, if 2 there can be one empty line, and so on. I fail with naming, having value 1 to disallow any empty lines makes sense, but it's not "maximum amount of empty lines", it's more of "fail if there is that much empty lines".
fc06231
to
a7bf22a
Compare
Correction, I can be changed either way. |
This looks better to me than the first idea.
Why not |
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.
I think this is a useful addition.
Not allowing any empty line is maybe not a feature sought after in the context of fix-whitespace, so I think having 0
switching off the check (and 1
for normalizing subsequent empty lines to a single one) is ok.
So, happy to merge if that one comment is addressed.
Please suggest concrete changes, my English is quite bad (I feel i'm very often misunderstood), so instead of going back and forth on comments and wording, just propose what to write. If you cannot, I cannot either. |
Please pick all the colors for the bikeshed at once if you can; or I'll just ask ChatGPT to make the changes for you. |
I don't want to derail this already perfectly useful patch, so I'll try to stay away. Also just FYI I don't have the approve bits. |
Co-authored-by: Artem Pelenitsyn <[email protected]>
ping. I think I addressed the comment already. Please merge. |
Resolves #68
Add an option to check for maximum count of consecutive empty lines. If zero, unlimited cmount is allowed. If 1, there cannot be empty lines (1 empty lines triggers an error) , if 2 there can be one empty line (2 consecutive empty lines trigger an error), and so on.
I fail with naming, having value 1 to disallow any empty lines makes sense, but it's not "maximum amount of empty lines", it's more of "fail if there is that much empty lines".