From 090824526b07a889e54adebaba7f551a5022c507 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Tue, 7 Aug 2018 12:19:00 -0700 Subject: [PATCH] ci: enforce formatting of .bzl files (#23544) These are now enforced in google3 so we want to match, so that PRs don't get held up when we sync PR Close #23544 --- .circleci/config.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4ad0d76d94..2469efc165 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,7 +48,7 @@ jobs: # Check BUILD.bazel formatting before we have a node_modules directory # Then we don't need any exclude pattern to avoid checking those files - - run: 'buildifier -mode=check $(find . -type f \( -name BUILD.bazel -or -name BUILD \)) || + - run: 'buildifier -mode=check $(find . -type f \( -name "*.bzl" -or -name BUILD.bazel -or -name BUILD \)) || (echo "BUILD files not formatted. Please run ''yarn buildifier''" ; exit 1)' # Run the skylark linter to check our Bazel rules # deprecated-api is disabled because we use actions.new_file(genfiles_dir) diff --git a/package.json b/package.json index af71963e40..f0d8ead24a 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "preskylint": "bazel build --noshow_progress @io_bazel//src/tools/skylark/java/com/google/devtools/skylark/skylint:Skylint", "skylint": "find . -type f -name \"*.bzl\" ! -path \"*/node_modules/*\" ! -path \"./dist/*\" | xargs $(bazel info bazel-bin)/external/io_bazel/src/tools/skylark/java/com/google/devtools/skylark/skylint/Skylint --disable-checks=deprecated-api", "prebuildifier": "bazel build --noshow_progress @com_github_bazelbuild_buildtools//buildifier", - "buildifier": "find . -type f \\( -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/*/buildifier", + "buildifier": "find . -type f \\( -name \"*.bzl\" -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/*/buildifier", "preinstall": "node tools/yarn/check-yarn.js", "postinstall": "yarn update-webdriver && node ./tools/postinstall-patches.js && yarn patch-types", "//patch-types": "work-around for issue https://github.com/angular/angular/issues/25051",