From c15d2365450273d194f91647990183b6a9c2f8ad Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 21 Aug 2018 19:15:14 -0700 Subject: [PATCH] tools: apply linting to first commit in PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use Travis-CI to check the formatting of the first commit in a pull request. This will hopefully reduce formatting errors and nits about them in pull requests. PR-URL: https://github.com/nodejs/node/pull/22452 Reviewed-By: Weijia Wang Reviewed-By: Trivikram Kamat Reviewed-By: Michaƫl Zasso Reviewed-By: Steven R Loomis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3dc3a73c333b35..3acc2827975d63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,8 @@ matrix: - NODE=$(which node) script: - make lint + # Lint the first commit in the PR. + - git log HEAD ^$TRAVIS_BRANCH --pretty=format:'%h' --no-merges | tail -1 | xargs npx core-validate-commit --no-validate-metadata - name: "Test Suite" install: - ./configure