Commit e76afe8
authored
fix(buildifier): formatting of BUILD file (#594)
When editing a file named BUILD, the command `buildifier` was executed,
but the file in the editor was not reformatted properly.
If I'd run `buildifier [path-to-file]`, the file would be reformatted as
expected, so the formatter works as expected in this case.
After experimenting a bit, I came up with the new command line I propose
in this change. It still sends the code via stdin to `buildifier`, but
now is aware of the path the file has in the project. This seems to have
an influence on the behavior of `buildifier`.
See `buildifier --help`:
```
-type string
Input file type: build (for BUILD files), bzl (for .bzl files),
workspace (for WORKSPACE files), default (for generic Starlark
files) or auto (default, based on the filename) (default "auto")
```1 parent 02fd64f commit e76afe8
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
0 commit comments