Enable automated formatting of build files through Buildifier
I am not quite clear about this issue. Do you mean we need a format script like envoy_build_fixer.py, or a script downloading Buildifier and then running Buildifier FILE_PATH to fix the format problem?
@stefanbucur
Sorry for missing this one!
The functionality I had in mind was something that could automatically format the BUILD files once they are submitted in a PR. But I'm actually not sure how practical this is in Github. @asraa do you have a sense of the best way to do this?
At the very least, I'm thinking of having a check that fails if the BUILD files are not formatted according to the expectations of the buildifier tool.
As for the implementation itself, we should employ the simplest approach IMO - if a shell script invoking Buildifier will do the job, that's good enough.
Github pre-submit hooks maybe? Before pushing a commit you can run a hook that runs the shell script with buildifier
Doesn't the bazel lint job currently do this?