Java HTML Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.ci Adapted CI to master. Jan 10, 2017
_ext Provision of Spotless Eclipse CDT formatter plugin. (#231) Apr 5, 2018
_images Fixed images which got corrupted somehow. Nov 30, 2016
gradle Bump Ktlint and Gradle versions. Apr 3, 2018
ide Improved ide. Dec 22, 2016
javadoc-publish Fix javadoc-publish. Jan 9, 2017
lib-extra Moved all test resources into testlib/src/main. Exposes that we've go… Feb 12, 2018
lib Add line and column numbers to error messages in ktlint. May 30, 2018
plugin-gradle Bump all versions to snapshot. Jun 2, 2018
plugin-maven Publish lib & plugin-maven 1.13.0, plugin-gradle 3.13.0 Jun 2, 2018
testlib Add line and column numbers to error messages in ktlint. May 30, 2018
.editorconfig .md files are now indented by 2 spaces, for better GitHub code fences Jan 19, 2018
.gitattributes Update gradle version to 4.4.1. (#186) Jan 8, 2018
.gitignore Update gradle version to 4.4.1. (#186) Jan 8, 2018
.travis.yml Gah! Fumble-fingers, I forgot the build. Feb 5, 2018
CHANGES.md Publish lib & plugin-maven 1.13.0, plugin-gradle 3.13.0 Jun 2, 2018
CODE_OF_CONDUCT.md Add code of conduct, per GitHub's suggestion. Feb 2, 2018
CONTRIBUTING.md Moved all test resources into testlib/src/main. Exposes that we've go… Feb 12, 2018
ECLIPSE_SCREENSHOTS.md Big update to the README structure. Jan 3, 2017
ISSUE_TEMPLATE.md Issue template should prompt for gradle or maven version. Feb 16, 2018
LICENSE.txt Initial commit: first version of the plugin Mar 15, 2014
PADDEDCELL.md .md files are now indented by 2 spaces, for better GitHub code fences Jan 19, 2018
PULL_REQUEST_TEMPLATE.md Add note to PR template to ensure contributors can edit PRs. (#201) Feb 9, 2018
README.md Update main changelog about Ktlint support in maven plugin Mar 12, 2018
build.gradle Applied new paddedCell to gradle formatting. Added corresponding comm… May 4, 2017
gradle.properties Bump all versions to snapshot. Jun 2, 2018
gradlew Update gradle version to 4.4.1. (#186) Jan 8, 2018
gradlew.bat Reverting gradle wrapper back to 2.14.1, from 3.2.1. 3.2.1 seems not … Dec 21, 2016
settings.gradle Introduced the testlib package, and moved ResourceHarness into it. Dec 7, 2016
spotless.eclipseformat.xml Moving spotless to a subfolder didn't work at all, it turns out. Whoops. Jan 6, 2017
spotless.groovyformat.prefs Fixes according to review by @jbduncan (as far as possible, using the… Apr 8, 2017
spotless.importorder Moving spotless to a subfolder didn't work at all, it turns out. Whoops. Jan 6, 2017
spotless.license Moving spotless to a subfolder didn't work at all, it turns out. Whoops. Jan 6, 2017
spotlessSelf.gradle .md files are now indented by 2 spaces, for better GitHub code fences Jan 19, 2018

README.md

Spotless: Keep your code spotless

Travis CI Live chat License Apache

Spotless can format <java | markdown | license headers | anything> using <gradle | maven | anything>.

Ideally, a code formatter can do more than just find formatting errors - it should fix them as well. Such a formatter is really just a Function<String, String>, which returns a formatted version of its potentially unformatted input.

It's easy to build such a function, but there are some gotchas and lots of integration work (newlines, character encodings, idempotency, and build-system integration). Spotless tackles those for you so you can focus on just a simple Function<String, String> which can compose with any of the other formatters and build tools in Spotless' arsenal.

Current feature matrix

Feature / FormatterStep plugin-gradle plugin-maven (Your build tool here)
generic.EndWithNewlineStep 👍 👍 ⬜️
generic.IndentStep 👍 👍 ⬜️
generic.LicenseHeaderStep 👍 👍 ⬜️
generic.ReplaceRegexStep 👍 👍 ⬜️
generic.ReplaceStep 👍 👍 ⬜️
generic.TrimTrailingWhitespaceStep 👍 👍 ⬜️
groovy.GrEclipseFormatterStep 👍 ⬜️ ⬜️
java.GoogleJavaFormatStep 👍 👍 ⬜️
java.ImportOrderStep 👍 👍 ⬜️
java.RemoveUnusedImportsStep 👍 👍 ⬜️
java.EclipseFormatterStep 👍 👍 ⬜️
kotlin.KtLintStep 👍 👍 ⬜️
markdown.FreshMarkStep 👍 ⬜️ ⬜️
scala.ScalaFmtStep 👍 👍 ⬜️
sql.DBeaverSQLFormatterStep 👍 ⬜️ ⬜️
(Your FormatterStep here) ⬜️ ⬜️ ⬜️
Fast up-to-date checking 👍 ⬜️ ⬜️
Automatic idempotency safeguard 👍 ⬜️ ⬜️

Acknowledgements