Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 1.18 KB

README.md

File metadata and controls

23 lines (17 loc) · 1.18 KB

The default Java Play application generated by running the "play new" command contains a number of stylistic problems, including:

  • Wildcard imports.
  • Superfluous imports (referencing code not used in class).
  • No package-level documentation (i.e. no package-info.java files).
  • No class or method level JavaDocs.
  • Inconsistent indentation.
  • Test code is located in the default package.
  • View template names (index.scala.html and main.scala.html) compile into Java classes that violate best practices (i.e. capitalization) for Java class names.

When such an application is processed using Checkstyle with a reasonable ruleset, approximately 50 warnings are generated.

Play-new-passcheckstyle implements a revised version of the default Java Play application that does not generate any checkstyle warnings and better conforms to Java best practices.

You can use the "diff" feature of GitHub to figure out exactly what changes were made.

It would, of course, be awesome if the Play developers fixed the "new" command in some future release to generate a default application using best practices for Java coding style.