diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2017-12-11 15:57:19 +0100 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2017-12-11 15:57:19 +0100 |
commit | 0275b5802ffd416dd0ed739955445a1c3c0287e9 (patch) | |
tree | 96ef08333268e3d99dc3d04855e1d4a5729af43f | |
parent | 4cd5ba6019ecf8a9c41c8594a5446286af725793 (diff) | |
parent | f1168b816dcbd8ee45787da1251ba5b2a68176d5 (diff) |
Merge PR #6331: Linter: skip PRs older than the linter.
-rwxr-xr-x | dev/lint-repository.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dev/lint-repository.sh b/dev/lint-repository.sh index ecf7880e2..87a829746 100755 --- a/dev/lint-repository.sh +++ b/dev/lint-repository.sh @@ -11,6 +11,13 @@ CODE=0 if [ "(" "-n" "${TRAVIS_PULL_REQUEST}" ")" "-a" "(" "${TRAVIS_PULL_REQUEST}" "!=" "false" ")" ]; then + # skip PRs from before the linter existed + if [ -z "$(git ls-tree --name-only "${TRAVIS_PULL_REQUEST_SHA}" dev/lint-commits.sh)" ]; + then + 2>&1 echo "Linting skipped: pull request older than the linter." + exit 0 + fi + # Some problems are too widespread to fix in one commit, but we # can still check that they don't worsen. CUR_HEAD=${TRAVIS_COMMIT_RANGE%%...*} |