Skip to content

buildifier formatter should pass the path to the file being formatted #100

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

Closed
malcolmr opened this issue Jul 25, 2018 · 0 comments
Closed
Assignees

Comments

@malcolmr
Copy link
Member

malcolmr commented Jul 25, 2018

buildifier recently changed formatting behaviour depending on whether you are formatting a BUILD file or a .bzl file. For example, for BUILD it sorts all parameter lists by name.

codefmt invokes buildifier via stdin/stdout, so buildifier doesn't know whether it is a BUILD file or .bzl (and assumes the former, leading to spurious changes).

We can specify that path using the existing -path flag, even if we're formatting via a pipe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant