undercover-checkstyle
Installation
Add this line to your application's Gemfile:
gem 'undercover-checkstyle'
And then execute:
$ bundle install
Usage
Setting up required LCOV reporting
bundle exec undercover-checkstyle
GitHub Actions Example
reviewdog.yml
runner:
undercover:
cmd: bundle exec undercover-checkstyle --compare origin/master
level: warning
format: checkstyle
.github/workflows/ruby.yml
name: Ruby
on:
pull_request:
jobs:
rspec:
runs-on: ubuntu-latest
env:
RUBYOPT: -EUTF-8
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Rspec
run: bundle exec rspec
- name: Setup reviewdog
run: |
mkdir -p $HOME/bin && curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $HOME/bin
echo ::add-path::$HOME/bin
echo ::add-path::$(go env GOPATH)/bin # for Go projects
- name: Run reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git fetch
reviewdog -reporter=github-pr-review -runners=undercover