-
-
Notifications
You must be signed in to change notification settings - Fork 581
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
--check-only return code regression in 4.2.3+ / Add --enforce-whitespace option #423
Comments
Hi @jmagnusson thanks for reporting! I'll see if I can get a hot fix release out soon that resolves this Thanks! ~Timothy |
Looks like check-only was changed to ignore whitespace (including new lines) here: |
@bootandy you are correct, so this is indeed an intended change and not a regression. I'll go ahead and mark as closed. Thanks! ~Timothy |
Okay... So how does one check for correctly formatted imports now exactly? It was a very useful feature IMO. |
@jmagnusson it still should work for checking most formatting issues, just not things like an lines between imports. This is a tough thing to get right, as peoples definition of what signifies a failure is different from group to group. What would think about a Thanks! ~Timothy |
That would work for me! |
As I asked in #378 which is the PR for the original behavior change, what's the reasoning for it? I'd rather an |
I was recently bit by this as well. Sometimes a contributor will unknowingly slip in whitespace changes. These used to be caught on the CI server, but that is no longer the case. The end result is that the next time someone runs |
@timothycrosley Would be awesome to have a release with the commit for |
@timothycrosley can we have a release with the |
In isort 4.2.3 and higher I no longer get a non-0 return code for formatting errors when I pass in
--check-only
.Let's say I have a script called
mylib.py
, with the following contents:Here's the behavior with different isort versions:
My CI tests are no longer failing because of this. Would be awesome if this could be fixed!
The text was updated successfully, but these errors were encountered: