You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was an interesting bug to encounter, if you have syntactically invalid code, running ALEFix with yapf as the only fixer results in deleting all content from the file.
Here's a really simplified example derived from the case I ran into this with:
Now any fixer which runs with an asynchronous job which returns empty output will be skipped. I figure there's just about nothing which will fix problems in a file by returning no output at all, and if you really want to fix a file that way, you can just delete every line in the file yourself.
I'll figure out some way to report errors from jobs later. For yapf, it's obvious, as the linters will tell you about syntax errors.
This was an interesting bug to encounter, if you have syntactically invalid code, running ALEFix with yapf as the only fixer results in deleting all content from the file.
Here's a really simplified example derived from the case I ran into this with:
It's more startling to see that happen with more code in a file, but my guess is that this is undesired behaviour no matter how terrible the error.
Note: yapf doesn't do this on the command line if you run it on an invalid file, it just returns a SyntaxError.
The text was updated successfully, but these errors were encountered: