diff --git a/.circleci/config.yml b/.circleci/config.yml index a2d8f0dbf1..80335f00c3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,14 +41,14 @@ jobs: steps: - checkout: <<: *post_checkout - # See remote cache documentation in /docs/BAZEL.md - - run: .circleci/setup_cache.sh - - run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc - - *setup-bazel-remote-cache - - run: 'yarn buildifier -mode=check || - (echo -e "\nBUILD files not formatted. Please run ''yarn buildifier''" ; exit 1)' - - run: 'yarn skylint || + # 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 \)) || + (echo "BUILD files not formatted. Please run ''yarn buildifier''" ; exit 1)' + # Run the skylark linter to check our Bazel rules + - run: 'find . -type f -name "*.bzl" | + xargs java -jar /usr/local/bin/Skylint_deploy.jar || (echo -e "\n.bzl files have lint errors. Please run ''yarn skylint''"; exit 1)' - restore_cache: