diff options
author | Gil <mcg@google.com> | 2018-03-07 09:59:38 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-07 09:59:38 -0800 |
commit | b7750b588c1d7ae9ea3891a254a39de5d3b3c572 (patch) | |
tree | f90e211a858839ceb497e55b3edc475bf4b286f1 /.travis.yml | |
parent | 5930ad2feebc6628cbaec89b8f6a6146ed6afe5d (diff) |
Speed up source checks in Travis (#885)
* Factor out a whitespace checking script
* Factor out a copyright checking script
* Rewrite lint.sh to honor revision ranges
* Only restyle files that are part of the PR
* Run C++ lint before builds to fail faster
* Git grep doesn't operate on revision ranges
* style.sh accepts clang-format 6 or 7
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml index 7c1c0b4..691d9d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,17 +30,18 @@ before_install: fi script: - # Fail on trailing whitespace in non-binary, non-generated-nanopb files - - "! git grep -I ' $' ':(exclude)Firestore/Protos/nanopb'" - - "! git grep -EL --name-only 'Copyright [0-9]{4}.*Google' | grep -v third_party | egrep '\\.(m|h|cc|mm|c)$'" - - ./scripts/style.sh test-only # Validate clang-format compliance + - ./scripts/check_whitespace.sh + - ./scripts/check_copyright.sh + - ./scripts/style.sh test-only $TRAVIS_COMMIT_RANGE - | - if [ $SKIP_FIREBASE != 1 ]; then - ./test.sh + # Google C++ style compliance + if [ $SKIP_FIRESTORE != 1 ]; then + ./scripts/lint.sh $TRAVIS_COMMIT_RANGE fi + - | - if [ $SKIP_FIRESTORE != 1 ]; then - ./scripts/lint.sh # Google C++ style compliance + if [ $SKIP_FIREBASE != 1 ]; then + ./test.sh fi - | if [ $SKIP_FIRESTORE != 1 ]; then |