Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 51 lines (44 sloc) 1.55 KB
#!/bin/bash
set -v
if [ -n "${TRAVIS_PULL_REQUEST}" ] && [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
# Travis-CI
#
# git clone --depth=50 \
# git://github.com/packsaddle/example-ruby-travis-ci.git \
# packsaddle/example-ruby-travis-ci
# cd packsaddle/example-ruby-travis-ci
# git fetch origin +refs/pull/1/merge:
# git checkout -qf FETCH_HEAD
echo gem install
gem install --no-document rubocop-select rubocop rubocop-checkstyle_formatter \
checkstyle_filter-git
echo git diff
git diff -z --name-only origin/master
echo rubocop-select
git diff -z --name-only origin/master \
| xargs -0 rubocop-select
echo rubocop
git diff -z --name-only origin/master \
| xargs -0 rubocop-select \
| xargs rubocop \
--require rubocop/formatter/checkstyle_formatter \
--format RuboCop::Formatter::CheckstyleFormatter
echo checkstyle_filter-git
git diff -z --name-only origin/master \
| xargs -0 rubocop-select \
| xargs rubocop \
--require rubocop/formatter/checkstyle_formatter \
--format RuboCop::Formatter::CheckstyleFormatter \
| checkstyle_filter-git diff origin/master
echo saddler
git diff -z --name-only origin/master \
| xargs -0 rubocop-select \
| xargs rubocop \
--require rubocop/formatter/checkstyle_formatter \
--format RuboCop::Formatter::CheckstyleFormatter \
| checkstyle_filter-git diff origin/master \
| bundle exec saddler report \
--require saddler/reporter/github \
--reporter Saddler::Reporter::Github::PullRequestReviewComment
fi
exit 0