-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Question: how to configure import/order
to not enforce any policy on empty lines?
#519
Comments
I think this is just some doc error that I made, this rule doesn't talk about assertion messages at all. At the moment, you can either enforce having an empty line, or enforce having no empty lines, one or the other. Though looking at the code makes me doubt this statement. I'll have to look at it more deeply. I'm 👍 the idea for an |
Personally I don't care about the default as long it can be changed via a configuration value. Currently it can't, because "you can either enforce having an empty line, or enforce having no empty lines, one or the other." which is very unfortunate. Thanks for the clarification though, I hope this "you can either enforce having an empty line, or enforce having no empty lines, one or the other" will get to the documentation. |
@jfmengels: |
It could, but we might as well make it a new explicit string value. Clearer and more consistent |
@jfmengels Speaking about the code, it doesn't even check for
Tried to follow the code into |
ah, I missed this:
string is fine 😁 |
@sompylasar really laid it on me with that 👎 ... 😅 |
|
No it doesn't. I don't know what you all think, but I think it would be nice to have this option, and that it would be the default setting. If we do want to go that way, that would be a breaking change, so it would have to be included in the upcoming v2 release. Let me know what you think. |
My rule is configured as:
So I assume this clause should be triggering, as I omit
newlines-between
:But I still get a warning about empty lines:
for the following code:
I expect no warnings about empty lines if
newlines-between
is not configured.Probably it would be nice to have an explicit
"ignore"
value along with"always"
and"never"
which will be the default behavior ifnewslines-between
isn't configured.The text was updated successfully, but these errors were encountered: