jmonkeyengine icon indicating copy to clipboard operation
jmonkeyengine copied to clipboard

checking Java code style

Open stephengold opened this issue 2 years ago • 3 comments

PR #1655 documented this project's preferred Java coding style. The next step would be to add tools that nudge the project toward compliance with that style.

For my own projects, I've begun using Checkstyle. It is highly configurable and integrated nicely into Gradle. That's the tool I recommend.

Here's how I envision the process:

  1. Add a checkstyle configuration file with a handful of modules and <property name="severity" value="warning"/>. Add apply plugin: 'checkstyle' to common.gradle. This could generate warnings for minor style issues like tab characters, unused imports, and trailing whitespace.
  2. Clean up the "master" branch until there are no checkstyle warnings.
  3. Up the severity to "error" so that style issues abort the build.
  4. Further cleanup the "master" branch, adding checkstyle modules as we go.

stephengold avatar Dec 09 '22 05:12 stephengold

PR: https://github.com/jMonkeyEngine/jmonkeyengine/pull/2042

andygibson avatar Jul 24 '23 22:07 andygibson

Onward to step 2!

stephengold avatar Jul 28 '23 19:07 stephengold

PR: #2054

andygibson avatar Jul 28 '23 23:07 andygibson