From 0a753ea8304f753872a71474339777ef9db083bd Mon Sep 17 00:00:00 2001 From: chrislovecnm Date: Tue, 25 Oct 2022 13:51:19 -0600 Subject: [PATCH] Updating docs I ran into the problem where I did not have python installed, and I did not want to install it. Hey I use bazel! When you do not have python installed you cannot use pre-submit to configure running buildifier. It took me forever to figure out how to run it, so I included the command in the CONTRIBUTING.md. --- CONTRIBUTING.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 41dbd96fc2..8092f361fd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,6 +6,7 @@ just a few small guidelines you need to follow. ## Formatting Starlark files should be formatted by buildifier. +Otherwise the Buildkite CI will yell at you about formatting/linting violations. We suggest using a pre-commit hook to automate this. First [install pre-commit](https://pre-commit.com/#installation), then run @@ -13,8 +14,15 @@ then run ```shell pre-commit install ``` +### Running buildifer manually -Otherwise the Buildkite CI will yell at you about formatting/linting violations. +If you choose to run buildifier manually, run the following command: + +```shell +$ buildifier --lint=fix --warnings=native-py -warnings=all WORKSPACE +``` + +Replace the argument "WORKSPACE" with the file that you are linting. ## Contributor License Agreement