A rubocop formatter that outputs in checkstyle format
Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gemfiles
lib/rubocop/formatter
spec
.gitignore
.rubocop.yml enable Style/FrozenStringLiteralComment Apr 22, 2017
.rubocop_todo.yml
.travis.yml
Appraisals add rubocop versions to be tested on Travis CI Apr 12, 2018
Gemfile
LICENSE.txt
README.md
Rakefile add appraisal gem to test against supported versions of rubocop Jun 4, 2014
rubocop-checkstyle_formatter.gemspec update to 0.4.0 Apr 23, 2017

README.md

RuboCop Checkstyle Formatter

A formatter for RuboCop that outputs in checkstyle format. It requires RuboCop version 0.20.1 or above.

Build Status

Installation

Add this line to your application's Gemfile:

gem 'rubocop-checkstyle_formatter', require: false

And then execute:

$ bundle

Or install it yourself as:

$ gem install rubocop-checkstyle_formatter

Usage

$ rubocop --require rubocop/formatter/checkstyle_formatter --format RuboCop::Formatter::CheckstyleFormatter

I use this formatter in Jenkins with Checkstyle plugin. As a part of build, I execute rubocop as shell script like:

bundle exec rubocop --require rubocop/formatter/checkstyle_formatter --format RuboCop::Formatter::CheckstyleFormatter --no-color --rails --out tmp/checkstyle.xml

Then, after build, I add post-build action 'Publish Checkstyle analysis results' and configure Checkstyle results to "tmp/checkstyle.xml".

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request