-
Notifications
You must be signed in to change notification settings - Fork 408
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
Buildifier formats inconsistently and contrary to PEP-8 #109
Comments
Work is being done on #2 to create a 'skylarkifier' which will likely be part of buildifier and create a consistent skylark format. This will not be quite the same as py-format for a few reasons including spaces around named-parameters. |
That's fine, if buildifier can format everything that p.s. Please, for the love of readability, support this:
...rather than the asinine, less-readable format that Also, not in my original example, but buildifier is also missing maximum line length (which can occur in |
Buildifier can currently format only BUILD files. If you pass a .bzl file, it will skip the As in Go, there is no strict maximum line length. In particular, it's possible to have long labels in BUILD files (e.g. when you have a deep directory structure) and you shouldn't split them. Shall we close this issue, or is there an action item? |
The lack of a functioning style tool for |
In this vein, it would be nice if buildifier could format and buildozer could see rule/macro invocations that were gated by a top-level |
Buildifier apparently wants spaces around named parameters, which is contrary to PEP-8. However, it doesn't enforce them consistently, making it near impossible to maintain code style consistency. It is also lacking vs. PEP-8 in several other ways.
For example:
How many style problems/inconsistencies can you spot in the above? There are several, but buildifier sees none.
(If buildifier followed PEP-8, this wouldn't be a problem;
pycodestyle
could be used to fill in the gaps that buildifier leaves.)The text was updated successfully, but these errors were encountered: