spotless

Keep your code spotless

Github星跟踪图

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

Why are there empty squares? Many projects get harder to work on as they get bigger. Spotless is easier to work on than ever, and one of the reasons why is that we don't require contributors to "fill the matrix". If you want to add Bazel support, we'd happily accept the PR even if it only supports the one formatter you use. And if you want to add FooFormatter support, we'll happily accept the PR even if it only supports the one build system you use.

Once someone has filled in one square of the formatter/build system matrix, it's easy for interested parties to fill in any empty squares, since you'll now have a working example for every piece needed.

Acknowledgements

主要指标

概览
名称与所有者diffplug/spotless
主编程语言Java
编程语言Java (语言数: 12)
平台
许可证Apache License 2.0
所有者活动
创建于2015-04-27 19:10:58
推送于2025-06-06 21:25:27
最后一次提交
发布数509
最新版本名称maven/2.44.5 (发布于 2025-05-27 22:00:56)
第一版名称v1.0 (发布于 )
用户参与
星数4.9k
关注者数29
派生数475
提交数6.1k
已启用问题?
问题数1114
打开的问题数211
拉请求数1065
打开的拉请求数28
关闭的拉请求数247
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?