Skip to content

Releases: saveourtool/diktat

Release 2.0.0

18 Dec 14:50
1b4b6c7
Compare
Choose a tag to compare

🥳 🥳 🥳

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

Read more

Release v2.0.0-rc.8

10 Nov 21:01
7b7d2b6
Compare
Choose a tag to compare
release candidate 2.0.0

Release 1.2.5

17 Mar 17:40
d209360
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.2.4.2...v1.2.5

Release 1.2.4.2

15 Nov 16:06
ff1ec1e
Compare
Choose a tag to compare

HOTFIX FOR STABILISATION OF KTLINT

What's Changed

  • Update versions in pom.xml and documentation after 1.2.4 release by @github-actions in #1556
  • Update Kotlin core dependencies to v1.7.21 by @renovate in #1558
  • Downgrade ktlint by @nulls in #1565

Full Changelog: v1.2.4...v1.2.4.2

Release 1.2.4.1

15 Nov 08:55
2d75446
Compare
Choose a tag to compare

What's Changed

  • Update versions in pom.xml and documentation after 1.2.2 release by @github-actions in #1483
  • gradle-plugin: fix incorrect dependencies related to SarifReportMergeTask by @petertrr in #1485
  • Properly format expressions wrapped before a binary operator by @0x6675636b796f75676974687562 in #1486
  • gradle-plugin: treat SarifReportMergeTask as non-mandatory by @petertrr in #1487

Full Changelog: v1.2.2...v1.2.4.1

Release 1.2.4

09 Nov 17:22
e8dbfb0
Compare
Choose a tag to compare

NOT STABLE RELEASE DUE TO PROBLEMS WITH KTLINT, USE 1.2.4.2 INSTEAD

What's Changed

Full Changelog: v1.2.3...v1.2.4

Release 1.2.3

29 Jul 17:33
2d75446
Compare
Choose a tag to compare

What's Changed

Gradle plug-in

  • Fix incorrect dependencies related to SarifReportMergeTask by @petertrr in #1485
  • Treat SarifReportMergeTask as non-mandatory by @petertrr in #1487

Indentation rule

  • The indentation in binary expressions wrapped before a binary operator
    or an infix function is also controlled with extendedIndentAfterOperators (@0x6675636b796f75676974687562, #1340).
  • The above is also true for in, !in, is, !is, and cast (as and as?) operators (examples).
  • The only binary operator which is an exception to the above rule is the Elvis operator (?:).

Full Changelog: v1.2.2...v1.2.3

Release 1.2.2

28 Jul 18:57
e38af67
Compare
Choose a tag to compare

What's Changed

Rules

Data classes

Indentation

  • Aligned chained method calls (dot-qualified and safe-access expressions) are no longer reported as false positives (#1336).
  • A separate extendedIndentForExpressionBodies flag has been added, defaulting to false (#1443).
    The flag controls whether continuation indent is used to indent expression bodies
    (previously, controlled with extendedIndentAfterOperators). The corresponding 3rd party flags are:
    • IDEA: CONTINUATION_INDENT_FOR_EXPRESSION_BODIES,
    • .editorconfig: ij_kotlin_continuation_indent_for_expression_bodies.
  • The extendedIndentAfterOperators flag now defaults to true to be consistent with IDEA (#1447).
  • Within expressions, the indent after an opening parenthesis ( followed by a newline is now controlled by the extendedIndentAfterOperators flag (#1448)

KDoc

Comments

Gradle plug-in

  • gradle-plugin: target Kotlin runtime 1.6 by @petertrr in #1419
  • gradle-plugin: Set user.home property if SARIF reporter is active by @petertrr in #1426
  • gradle-plugin: fix docs and tests for Groovy DSL by @petertrr in #1428
  • [gradle-plugin] use empty string as default value for reporter type by @petertrr in #1458
  • gradle-plugin: add task to merge sarif reports by @petertrr in #1456

Known issues

  • After the upgrade to version 1.2.2, Gradle plug-in requires the :mergeDiktatReports task to be present (#1484).

Documentation

Infrastructure

Full Changelog: v1.2.1...v1.2.2

Release 1.2.1

30 Jun 18:39
6c70495
Compare
Choose a tag to compare

Read first

This is minor release that contains bugfixes that we introduced in a dirty 1.2.0 release
Important: in 1.2.0 release we proposed breaking changes, especially related to whitespaces and newlines.

Critical bugfixes

What's Changed

Full Changelog: v1.2.0...v1.2.1

Release 1.2.0

23 Jun 14:44
75bf80f
Compare
Choose a tag to compare

Read first

Important: due to the bugfixes done in IntelliJ Idea formatter we finally removed several our workarounds, so whitespace/newlines formatting was slightly changed and code style updated. You can easily use FIX in diktat or our specially prepared .editorconfig to update formatting. This is why this release is not a patch, but has a minor version.

New features

Bugfixes

New Contributors

Full Changelog: v1.1.0...v1.2.0