-
Notifications
You must be signed in to change notification settings - Fork 79
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
Introduce automatic splitting of long lines #6
Comments
Hi, at the moment even if the splitting is not done automatically, I would like to stop as an error if the line is too long, and switching this on with a command-line switch. The reason is that I'm using By looking at the code, the way I would do it is to have a flag that converts WARNING level logs to errors and stop. |
I'd prefer to not introduce such a flag and to stop only for failures. It is not a problem for fprettify to handle long lines. As long as the input code is standard conforming, fprettify should not stop with an error. So I leave it up to you to check the warning message (but I don't know how to do that with pre-commit). |
I see your point, but at the moment the indentation is wrong and until this issue is fixed we get a "wrong" output... a person can easily split and run again fprettify. I understand you don't want to change the code, but would you accept an extension (optional for users) to the pre-commit file in your repo, that wraps fprettify and exits with a non-zero error code if there is any output? Most people wouldn't notice but I could use it. |
Never mind, I think I found a way to do this directly in my repo: giovannipizzi/wannier90@01d1231 |
is line splitting going to be implemented? It would be very helpful for legacy code |
I still agree that this should be a feature, unfortunately I won't have time in the near future to implement this. |
It's a useful feature and should not be too hard to implement
The text was updated successfully, but these errors were encountered: