From 43e129e899bb5e4e87bbead730b849e125bb7513 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 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. --- .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