Skip to content

walkmod/walkmod-checkstyle-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 

Repository files navigation

walkmod-checkstyle-plugin

Build Status

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.

About

Plugin to automatically fix checkstyle violations

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages