Skip to content

Releases: diffplug/spotless

Maven Plugin v2.44.1

07 Jan 16:33
Compare
Choose a tag to compare

Fixed

  • Deployment was missing part of the CDT formatter, now fixed. (#2384)

Lib v3.0.1

07 Jan 16:27
Compare
Choose a tag to compare

Fixed

  • Deployment was missing part of the CDT formatter, now fixed. (#2384)

Gradle Plugin v7.0.1

07 Jan 16:30
Compare
Choose a tag to compare

Fixed

  • Deployment was missing part of the CDT formatter, now fixed. (#2384)

Maven Plugin v2.44.0

06 Jan 22:21
Compare
Choose a tag to compare

Headline changes

Changed

  • Bump default ktlint version to latest 1.3.0 -> 1.4.0. (#2314)
  • Bump default jackson version to latest 2.18.0 -> 2.18.1. (#2319)
  • Bump default ktfmt version to latest 0.52 -> 0.53. (#2320)
  • Bump default ktlint version to latest 1.4.0 -> 1.5.0. (#2354)
  • Bump minimum eclipse-cdt version to 11.0 (removed support for 10.7). (#2373)
  • Bump default eclipse version to latest 4.32 -> 4.34. (#2381)

Fixed

  • You can now use removeUnusedImports and googleJavaFormat at the same time again. (fixes #2159)
  • The default list of type annotations used by formatAnnotations now includes Jakarta Validation's Valid and constraints validations (fixes #2334)

Lib v3.0.0

06 Jan 22:13
Compare
Choose a tag to compare

Headline changes

  • All steps now support roundtrip serialization (end of #987).
  • Spotless now supports linting in addition to formatting.

Changed

  • Allow setting Eclipse config from a string, not only from files (#2337)
  • Bump default ktlint version to latest 1.3.0 -> 1.4.0. (#2314)
  • Add Sort Members feature based on Eclipse JDT implementation. (#2312)
  • Bump default jackson version to latest 2.18.0 -> 2.18.1. (#2319)
  • Bump default ktfmt version to latest 0.52 -> 0.53. (#2320)
  • Bump default ktlint version to latest 1.4.0 -> 1.5.0. (#2354)
  • Bump minimum eclipse-cdt version to 11.0 (removed support for 10.7). (#2373)
  • Bump default eclipse version to latest 4.32 -> 4.34. (#2381)

Fixed

  • You can now use removeUnusedImports and googleJavaFormat at the same time again. (fixes #2159)
  • The default list of type annotations used by formatAnnotations now includes Jakarta Validation's Valid and constraints validations (fixes #2334)

Gradle Plugin v7.0.0

06 Jan 22:18
Compare
Choose a tag to compare

Headline changes

  • The long 7.0.0.BETAX period is finally over, Spotless for Gradle 7.0 is here!
  • Full, no asterisk support for configuration cache (end of #987)
  • Spotless now supports linting in addition to formatting.

Changed

  • Allow setting Eclipse config from a string, not only from files (#2337)
  • Bump default ktlint version to latest 1.3.0 -> 1.4.0. (#2314)
  • Bump default jackson version to latest 2.18.0 -> 2.18.1. (#2319)
  • Bump default ktfmt version to latest 0.52 -> 0.53. (#2320)
  • Bump default ktlint version to latest 1.4.0 -> 1.5.0. (#2354)
  • Bump minimum eclipse-cdt version to 11.0 (removed support for 10.7). (#2373)
  • Bump default eclipse version to latest 4.32 -> 4.34. (#2381)

Fixed

  • toggleOffOn now works with the configuration cache. (#2378 fixes #2317)
  • Using custom with a Groovy closure now works with and without configuration cache. (#2376)
    • Minimum required Gradle version for this to work has bumped from 8.0 to 8.4.
    • The global git system config is now ignored for line-ending purposes.
    • Added SerializeToByteArrayHack as a flag for a limitation at the intersection of toggleOffOn and custom.
  • You can now use removeUnusedImports and googleJavaFormat at the same time again. (fixes #2159)
  • The default list of type annotations used by formatAnnotations now includes Jakarta Validation's Valid and constraints validations (fixes #2334)
  • indentWith[Spaces|Tabs] has been deprecated in favor of leadingTabsToSpaces and leadingSpacesToTabs. (#2350 fixes #794)

Maven Plugin v2.44.0.BETA4

24 Oct 15:37
Compare
Choose a tag to compare

Added

  • Support for line ending policy PRESERVE which just takes the first line ending of every given file as setting (no matter if \n, \r\n or \r) (#2304)

Fixed

  • ktlint steps now read from the string instead of the file so they don't clobber earlier steps. (fixes #1599)

Lib v3.0.0.BETA4

24 Oct 15:31
Compare
Choose a tag to compare

Added

  • APIs to support linting. (implemented in #2148, #2149, #2307)
    • Spotless is still primarily a formatter, not a linter. But when formatting fails, it's more flexible to model those failures as lints so that the formatting can continue and ideally we can also capture the line numbers causing the failure.
    • Lint models a single change. A FormatterStep can create a lint by:
      • throwing an exception during formatting, ideally throw Lint.atLine(127, "code", "Well what happened was...")
      • or by implementing the List<Lint> lint(String content, File file) method to create multiple of them
  • Support for line ending policy PRESERVE which just takes the first line ending of every given file as setting (no matter if \n, \r\n or \r) (#2304)

Changes

  • BREAKING Moved PaddedCell.DirtyState to its own top-level class with new methods. (#2148)
    • BREAKING Removed isClean, applyTo, and applyToAndReturnResultIfDirty from Formatter because users should instead use DirtyState.

Fixed

  • ktlint steps now read from the string instead of the file so they don't clobber earlier steps. (fixes #1599)

Gradle Plugin v7.0.0.BETA4

24 Oct 15:34
Compare
Choose a tag to compare

Added

  • Support for line ending policy PRESERVE which just takes the first line ending of every given file as setting (no matter if \n, \r\n or \r) (#2304)
  • New suppressLintsFor DSL (docs) (#2307)
    • ignoreErrorForStep and ignoreErrorForPath are now deprecated aliases of suppressLintsFor
    • Spotless is still a formatter not a linter, it just models formatting failures as lints rather than stopping execution (resolves #287)

Fixed

  • ktlint steps now read from the string instead of the file so they don't clobber earlier steps. (fixes #1599)

Maven Plugin v2.44.0.BETA3

15 Oct 17:07
Compare
Choose a tag to compare

Added

Changed

  • Leverage local repository for Equo P2 cache. (#2238)
  • Add explicit support for CSS via biome. Formatting CSS via biome was already supported as a general
    formatting step. Biome supports formatting CSS as of 1.8.0 (experimental, opt-in) and 1.9.0 (stable).
    (#2259)
  • Bump default google-java-format version to latest 1.23.0 -> 1.24.0. (#2294)
  • Bump default jackson version to latest 2.17.2 -> 2.18.0. (#2279)
  • Bump default cleanthat version to latest 2.21 -> 2.22. (#2296)

Fixed

  • Java import order, ignore duplicate group entries. (#2293)