Skip to content

giter8 template demonstrating use of PMD and CheckStyle with sbt

Notifications You must be signed in to change notification settings

ymasory/sbt-code-quality.g8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbt-code-quality: or, how to use PMD and CheckStyle with sbt

Build Status

Usage

  • Install giter8.
  • Download & run this template.
$ cd
$ g8 ymasory/sbt-code-quality
$ cd <app name>
$ chmod u+x sbt
$ ./sbt
> checkstyle
> pmd
  • Check out target/checkstyle-report.xml.
  • Check out target/pmd-report.html.

Customize

  • Change the CLI args (val args) in CheckStyleSettings and PmdSettings in project/build.scala in the generated projects. See the CheckStyle CLI documentation and the PMD CLI documentation.
  • Tweak or replace project/checkstyle-config.xml and project/pmd-ruleset.xml in the generated project with something appropriate for your requirements. See the CheckStyle and PMD XML configuration docs.

Why not make an sbt plugin?

  • Why should I? Most code quality toold have a fully functional CLI interface. An sbt plugin would amount to a ton of boilerplate that replicates the CLI functionality.
  • sbt is not binary compatible between versions. It hasn't even been source compatible to date. This way is easier.
  • This same strategy can be used to quickly spit out new CLI-based tasks.

About

giter8 template demonstrating use of PMD and CheckStyle with sbt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages