File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ before_install:
55 - gem update --system
66 - gem install bundler
77bundler_args : --jobs=3 --retry=3 --without documentation debug
8+ before_script :
9+ - " bin/ci-code-review"
810script : bin/ci
911rvm :
1012 - 2.5
Original file line number Diff line number Diff line change @@ -20,4 +20,4 @@ bundle-audit check --update
2020
2121# Run style checker
2222echo " ---> Running rubocop"
23- bin/rubocop --extra-details --display-style-guide
23+ bin/rubocop --extra-details --display-style-guide --lint
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # See:
4+ # - https://docs.travis-ci.com/user/environment-variables/#Convenience-Variables
5+ # - https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
6+ # - https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
7+ if [[ " $TRAVIS_PULL_REQUEST " = " false" ]] || [[ " $TRAVIS_BRANCH " = " production" ]]; then
8+ exit
9+ fi
10+
11+ set -e
12+ cd " $( dirname " $0 " ) /.."
13+
14+ REVIEWDOG_VERSION=" 0.9.9"
15+
16+ if ! [ " $( ./bin/reviewdog -version) " = " $REVIEWDOG_VERSION " ]; then
17+ echo " Installing reviewdog version ${REVIEWDOG_VERSION} ..."
18+ curl -fsSL https://github.com/haya14busa/reviewdog/releases/download/$REVIEWDOG_VERSION /reviewdog_linux_amd64 \
19+ -o ./bin/reviewdog
20+ chmod +x ./bin/reviewdog
21+ fi
22+
23+ echo Rubocop Version: $( ./bin/rubocop --version)
24+ echo Review Dog Version: $( ./bin/reviewdog -version)
25+
26+ # Add `-diff="git diff master"` to reviewdog args when running locally
27+ ./bin/rubocop --config .rubocop.yml --extra-details --display-style-guide --rails | \
28+ ./bin/reviewdog -f=rubocop -reporter=github-pr-check
You can’t perform that action at this time.
0 commit comments