An open API service indexing awesome lists of open source software.

https://github.com/walkmod/walkmod-checkstyle-plugin

Plugin to automatically fix checkstyle violations
https://github.com/walkmod/walkmod-checkstyle-plugin

Last synced: 5 months ago
JSON representation

Plugin to automatically fix checkstyle violations

Awesome Lists containing this project

README

          

walkmod-checkstyle-plugin
=========================

image:https://travis-ci.org/walkmod/walkmod-checkstyle-plugin.svg?branch=master["Build Status", link="https://travis-ci.org/walkmod/walkmod-checkstyle-plugin"]

This is a walkmod plugin to automatically correct those Checkstyle rules that have a unique resolution. Currently, the supported rules are:

----
- TreeWalker/ArrayTypeStyle
- TreeWalker/AvoidInlineConditionals
- TreeWalker/AvoidStarImport
- TreeWalker/EmptyCatchBlock
- TreeWalker/EmptyStatement
- TreeWalker/NeedBraces
- TreeWalker/RedundantImport
- TreeWalker/UnusedImports
----

== Usage

1) Verify that your walkmod version is > = 2.2.0

2) Execute the following command to add this code transformation plugin as part of your conventions.

----
walkmod add checkstyle -DconfigurationFile='my-checkstyle-file.xml'
----

If you don't specify a configuration file, the applied conventions are the Sun conventions. If you are interested
in using the Google conventions, type:

----
walkmod add checkstyle -DconfigurationFile='google_checks.xml'
----

3) Now, You see the results, executing:

----
walkmod apply
----

Or, alternatively, you can also check which would be the modified classes typing:

----
walkmod check
----

== Contributing

If you want to hack on this, fork it, improve it and send me a pull request.

To get started using it, just clone it and call mvn install.