This repository has been archived by the owner on Feb 11, 2020. It is now read-only.
Permalink
Cannot retrieve contributors at this time
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?
example-circle_ci-pull_request_review/bin/run-rubocop.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
39 lines (33 sloc)
1.21 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -v | |
if [ "${CIRCLE_BRANCH}" != "master" ]; then | |
# Circle-CI | |
# | |
gem install --no-document rubocop-select rubocop rubocop-checkstyle_formatter \ | |
checkstyle_filter-git saddler saddler-reporter-github | |
# CircleCI stop script ;( | |
# git diff -z --name-only origin/master | |
git diff -z --name-only origin/master \ | |
| xargs -0 rubocop-select | |
git diff -z --name-only origin/master \ | |
| xargs -0 rubocop-select \ | |
| xargs rubocop \ | |
--require rubocop/formatter/checkstyle_formatter \ | |
--format RuboCop::Formatter::CheckstyleFormatter | |
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 | |
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 \ | |
| saddler report \ | |
--require saddler/reporter/github \ | |
--reporter Saddler::Reporter::Github::PullRequestReviewComment | |
fi | |
exit 0 |