Skip to content

Release 2.0.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 18 Dec 14:50
1b4b6c7

馃コ 馃コ 馃コ

This is a major release of Diktat, tailored to align with the global changes in the Kotlin ecosystem and the introduction of Kotlin 2.0. Our focus has shifted towards the Kotlin 2.0 compiler plugins, FIR and new IR, encompassing extensive preparatory efforts.
This includes:

  • the introduction of a new CLI driver, independent from ktlint;
  • transitioning from Maven to Gradle;
  • crafting new Gradle and Maven plugins;
  • refactoring, including the change of the package name: from org.cqfn to com.saveourtool;
  • migrations to latest Kotlin and Ktlint;
  • more than 25 fixes, requested by the community.

These initiatives aim to streamline our future development processes, simplifying the creation of new rules, while concurrently enhancing the complexity and precision of existing rules.

Functional changes and bugfixing

  • New rule to check if @Preview (Jetpack Compose) functions end with 'Preview' suffix and are also private (Part 1) by @kgevorkyan in #1726
  • Extracted REDUNDANT_SEMICOLON rule check from WRONG_NEWLINES rule by @DrAlexD in #1864
  • NPE in NewlinesRule.kt by @diphtongue in #1853
  • Provide fix logic for @Preview functions by @kgevorkyan in #1728
  • Inlined typealias for legacy LintError by @nulls in #1684
  • serialVersionUID should be ignored in CONSTANT_UPPERCASE by @diphtongue in #1849
  • Fixed PreviewAnnotationRule by @nulls in #1740
  • Fixed StatelessClassesRule by @nulls in #1741
  • Fixed TrailingCommaRule and StringTemplateRuleFixTest by @nulls in #1742
  • Fixed CommentsFormatting for else blocks by @nulls in #1743
  • Fixed IdentifierNaming by @nulls in #1746
  • Fixed KdocMethods by @DrAlexD in #1757
  • Fixed IndentationRule by @DrAlexD in #1760
  • Fixed KdocComments by @DrAlexD in #1754
  • Fixed LineLength by @DrAlexD in #1759
  • Fix for a NO_BRACES_IN_CONDITIONALS_AND_LOOPS failure within variable initialization block by @DrAlexD in #1739
  • Fixed warning FUNCTION_BOOLEAN_PREFIX on operator fun by @diphtongue in #1767
  • Fixed KdocComments for types in generic classes by @DrAlexD in #1832
  • Fixed BracesInConditionalsAndLoopsRule and added tests by @DrAlexD in #1750
  • Fixed VARIABLE_NAME_INCORRECT_FORMAT false positive when a property has a backing field by @diphtongue in #1810
  • Fixed bug related to assigning to declared vals inside null-check branches by @DrAlexD in #1851
  • Fixed false positive MISSING_KDOC_ON_FUNCTION on local function (function inside another function) by @diphtongue in #1848
  • Fixed WRONG_NEWLINES rule to take into account maxCallsInOneLine by @DrAlexD in #1858
  • Fixed CUSTOM_GETTERS_SETTERS false positive when a property has a backing field by @diphtongue in #1815
  • KDOC_WITHOUT_THROWS_TAG add @throws annotation when throw inside try-catch by @diphtongue in #1862
  • Fixed duplicate @property generation for parameter with ' in name by @DrAlexD in #1873

New CLI Driver

New Gradle and Maven plugins

Diktat Testing

Infra changes

Dependencies Updates

New Contributors

Full Changelog: v1.2.5...v2.0.0