All Projects → diffplug → Spotless

diffplug / Spotless

Licence: apache-2.0
Keep your code spotless

Programming Languages

javascript
184084 projects - #8 most used programming language
java
68154 projects - #9 most used programming language
Mustache
554 projects
HTML
75241 projects
Roff
2310 projects
ANTLR
299 projects

Projects that are alternatives of or similar to Spotless

Plugin Php
Prettier PHP Plugin
Stars: ✭ 1,243 (-45.6%)
Mutual labels:  prettier, formatter
Libsass Maven Plugin
libsass wrapper for maven
Stars: ✭ 114 (-95.01%)
Mutual labels:  maven, sass
Parallel Prettier
Concurrent prettier runner
Stars: ✭ 84 (-96.32%)
Mutual labels:  prettier, formatter
Eleventy Webpack
A barebone Eleventy and Webpack boilerplate 🎈
Stars: ✭ 68 (-97.02%)
Mutual labels:  prettier, sass
Pettier
Prettier config that randomizes options and arbitrarily switches between spaces and tabs 🙄
Stars: ✭ 149 (-93.48%)
Mutual labels:  prettier, formatter
Okta Blog Archive
Okta Developer Blog
Stars: ✭ 74 (-96.76%)
Mutual labels:  gradle, maven
Prettier
Prettier is an opinionated code formatter.
Stars: ✭ 41,411 (+1712.3%)
Mutual labels:  prettier, formatter
Notes
📝 Migrated to(迁移至) https://github.com/Kuangcp/Note 当前仓库已经废弃, 对应的博客网站:
Stars: ✭ 33 (-98.56%)
Mutual labels:  gradle, maven
Jib
🏗 Build container images for your Java applications.
Stars: ✭ 11,370 (+397.59%)
Mutual labels:  gradle, maven
Gradle Maven Plugin
Gradle 5.x Maven Publish Plugin to deploy artifacts
Stars: ✭ 124 (-94.57%)
Mutual labels:  gradle, maven
Sqlformat
.NET SQL Parser and Formatter Tool and SSMS Plugin
Stars: ✭ 49 (-97.86%)
Mutual labels:  sql, formatter
Prettier Plugin Apex
Code formatter for the Apex Programming Language
Stars: ✭ 138 (-93.96%)
Mutual labels:  prettier, formatter
Hellojpro
Stars: ✭ 46 (-97.99%)
Mutual labels:  gradle, maven
Circleci Orbs
The source code for some of the orbs published by CircleCI
Stars: ✭ 82 (-96.41%)
Mutual labels:  gradle, maven
Budgeting
Budgeting - React + Redux + Webpack (tree shaking) Sample App
Stars: ✭ 971 (-57.51%)
Mutual labels:  prettier, sass
Kotlin Mpp Standard
A standard setup for Kotlin multiplatform projects.
Stars: ✭ 92 (-95.97%)
Mutual labels:  gradle, maven
Sql Formatter
A whitespace formatter for different query languages
Stars: ✭ 779 (-65.91%)
Mutual labels:  sql, formatter
Android Cookbook Examples
Contributed code examples from O'Reilly Android Cookbook. See #user-content-table README below!
Stars: ✭ 935 (-59.08%)
Mutual labels:  gradle, maven
Javascriptprettier
A Visual Studio extension
Stars: ✭ 118 (-94.84%)
Mutual labels:  prettier, formatter
Publiccms
现代化java cms,由天津黑核科技有限公司开发,轻松支撑千万数据、千万PV;支持静态化,服务器端包含; 目前已经拥有全球0.0002%的用户,语言支持中、繁、日、英;是一个已走向海外的成熟CMS产品
Stars: ✭ 1,750 (-23.41%)
Mutual labels:  gradle, maven

Spotless: Keep your code spotless

Circle CI Live chat License Apache

Spotless can format <antlr | c | c# | c++ | css | flow | graphql | groovy | html | java | javascript | json | jsx | kotlin | less | license headers | markdown | objective-c | protobuf | python | scala | scss | sql | typeScript | vue | yaml | anything> using <gradle | maven | anything>.

You probably want one of the links below:

❇️ Spotless for Gradle (with VS Code integration)

❇️ Spotless for Maven

❇️ Spotless for SBT (external for now)

Other build systems

How it works (for potential contributors)

Ideally, a code formatter can do more than just find formatting errors - it should fix them as well. Such a formatter is 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, git ratcheting, 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 gradle maven sbt (Your build tool here)
Automatic idempotency safeguard 👍 👍 👍
Misconfigured encoding safeguard 👍 👍 👍
Toggle with spotless:off and spotless:on 👍 👍
Ratchet from origin/main or other git ref 👍 👍
Define line endings using git 👍 👍 👍
Fast incremental format and up-to-date check 👍
Fast format on fresh checkout using buildcache 👍
generic.EndWithNewlineStep 👍 👍
generic.IndentStep 👍 👍
generic.Jsr223Step 👍
generic.LicenseHeaderStep 👍 👍 👍
generic.NativeCmdStep 👍 👍
generic.ReplaceRegexStep 👍 👍
generic.ReplaceStep 👍 👍
generic.TrimTrailingWhitespaceStep 👍 👍
antlr4.Antlr4FormatterStep 👍 👍
cpp.ClangFormatStep 👍
cpp.EclipseFormatterStep 👍 👍 👍
groovy.GrEclipseFormatterStep 👍 👍 👍
java.GoogleJavaFormatStep 👍 👍 👍
java.ImportOrderStep 👍 👍 👍
java.RemoveUnusedImportsStep 👍 👍 👍
java.EclipseJdtFormatterStep 👍 👍 👍
kotlin.KtLintStep 👍 👍 👍
kotlin.KtfmtStep 👍 👍
kotlin.DiktatStep 👍 👍
markdown.FreshMarkStep 👍
npm.PrettierFormatterStep 👍 👍
npm.TsFmtFormatterStep 👍 👍
pom.SortPomStepStep 👍
python.BlackStep 👍
scala.ScalaFmtStep 👍 👍 👍
sql.DBeaverSQLFormatterStep 👍 👍 👍
wtp.EclipseWtpFormatterStep 👍 👍
(Your FormatterStep here)

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].