Skip to content

nsutcliffe/spotless

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotless: Keep your code spotless

Travis CI Live chat License Apache

Spotless can format <java | kotlin | scala | sql | groovy | javascript | flow | typeScript | css | scss | less | jsx | vue | graphql | json | yaml | 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 👍 👍
cpp.EclipseFormatterStep 👍 👍
groovy.GrEclipseFormatterStep 👍
java.GoogleJavaFormatStep 👍 👍
java.ImportOrderStep 👍 👍
java.RemoveUnusedImportsStep 👍 👍
java.EclipseFormatterStep 👍 👍
kotlin.KtLintStep 👍 👍
markdown.FreshMarkStep 👍
npm.PrettierFormatterStep 👍
npm.TsFmtFormatterStep 👍
scala.ScalaFmtStep 👍 👍
sql.DBeaverSQLFormatterStep 👍
wtp.EclipseWtpFormatterStep 👍 👍
(Your FormatterStep here)
Fast up-to-date checking 👍
Automatic idempotency safeguard 👍

Acknowledgements

About

Keep your code spotless

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 98.6%
  • HTML 1.3%
  • Shell 0.1%