Skip to content

Latest commit

 

History

History
145 lines (92 loc) · 5.39 KB

CHANGELOG.md

File metadata and controls

145 lines (92 loc) · 5.39 KB

Changelog

All notable changes to this project will be documented in this file. The format is based on Keep a Changelog v1.0.0, and this project adheres to Semantic Versioning v2.0.0.

Unreleased

Added

  • A new configuration nested object ktlint.lint with the property failOnErrors and the function disableFailOnErrors()
  • A new configuration property ktlint.gitPreCommitHook.abortOnErrors and function disableAbortOnErrors()
  • A new configuration DSL syntax:
    • The nested object ktlint.flags
      • The field ktlint.flags.codeStyle
      • The field ktlint.flags.limit
      • The field ktlint.flags.experimental
      • The function ktlint.enableExperimental()
    • The nested object ktlint.gitPreCommitHook
      • The nested object ktlint.gitPreCommitHook.installOnBuild
      • The function ktlint.gitPreCommitHook.enableInstallOnBuild()

Changed

  • If the ktlint version is set to 1.1.0 or greater and experimental rules are enabled the configuration will fail
  • If the ktlint version is set to 1.1.0 or greater and the code style is explicitly set then the configuration will fail
  • If the configuration ktlint.gitPreCommitHook.installOnBuild is set to true, then the Git pre-commit hook installation task will be made a dependency of the tasks assemble, preBuild and build.
    If none of those tasks exist, then the configuration will fail

Deprecated

  • The configuration property ktlint.flags.codeStyle is deprecated to mirror removal of the flag --code-style in ktlint version 1.1.0
  • The configuration property ktlint.flags.experimental is deprecated to mirror removal of the flag --experimental in ktlint version 1.1.0
  • The old configuration DSL syntax is now deprecated. That includes:
    • The field ktlint.codeStyle
    • The field ktlint.limit
    • The field ktlint.experimental
    • The function ktlint.enableExperimental()
    • The field ktlint.installGitPreCommitHookBeforeBuild

v0.1.0-indev09 - 2024-03-01

Changed

  • The ktlint version 1.2.0 is rejected because it contains a bug that breaks the behavior of the Git pre-commit hook script

v0.1.0-indev08 - 2023-10-28

Added

  • A new experimental task class KtlintFormattingTask that formats Kotlin source files

v0.1.0-indev07 - 2023-10-24

Added

  • The task installKtlintGitPreCommitHook is now cacheable
  • The option --color is added to the ktlint invocation (can be disabled with NO_COLOR)

Changed

  • The minimum supported version of ktlint is now 0.50.0
  • The configuration property experimentalRulesEnabled was renamed to just experimental (to mirror the name of the actual ktlint flag --experimental)

Removed

v0.1.0-indev06 - 2023-09-11

Added

  • Support for ktlint version 1.0.0+

v0.1.0-indev05 - 2023-06-14

Added

  • New experimentalRulesEnabled configuration property for adding the --experimental flag to the ktlint invocation
    • Convenience function enableExperimentalRules()

Fixed

  • The Java compatibility is now explicitly set to 11 (before it was implicitly 17)

v0.1.0-indev04 - 2023-05-04

Added

  • The hook will now also print the configured ktlint version
  • New limit configuration property for adding the --limit=<limit> flag to the ktlint invocation
  • New codeStyle configuration property for adding the --code-stye=<codeStyle> flag to the ktlint invocation

Deprecated

  • The android configuration property to mirror the deprecation of the --android flag

v0.1.0-indev03 - 2023-04-19

Added

  • New android boolean configuration property (ad2a302)

v0.1.0-indev02 - 2023-04-19

Fixed

  • Fixed the installKtlintGitPreCommitHook task (4db95eb)

v0.1.0-indev01 - 2023-04-14

Initial Release