Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
diktat-2.0.0.jar | 2023-12-18 | 72.0 MB | |
diktat.cmd | 2023-12-18 | 541 Bytes | |
diktat | 2023-12-18 | 75.9 MB | |
README.md | 2023-12-18 | 12.2 kB | |
Release 2.0.0 source code.tar.gz | 2023-12-18 | 2.8 MB | |
Release 2.0.0 source code.zip | 2023-12-18 | 3.4 MB | |
Totals: 6 Items | 154.2 MB | 0 |
🥳 🥳 🥳
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 https://github.com/saveourtool/diktat/pull/1726
- Extracted
REDUNDANT_SEMICOLON
rule check fromWRONG_NEWLINES
rule by @DrAlexD in https://github.com/saveourtool/diktat/pull/1864 - NPE in NewlinesRule.kt by @diphtongue in https://github.com/saveourtool/diktat/pull/1853
- Provide
fix logic
for @Preview functions by @kgevorkyan in https://github.com/saveourtool/diktat/pull/1728 - Inlined typealias for legacy LintError by @nulls in https://github.com/saveourtool/diktat/pull/1684
- serialVersionUID should be ignored in
CONSTANT_UPPERCASE
by @diphtongue in https://github.com/saveourtool/diktat/pull/1849 - Fixed PreviewAnnotationRule by @nulls in https://github.com/saveourtool/diktat/pull/1740
- Fixed StatelessClassesRule by @nulls in https://github.com/saveourtool/diktat/pull/1741
- Fixed TrailingCommaRule and StringTemplateRuleFixTest by @nulls in https://github.com/saveourtool/diktat/pull/1742
- Fixed CommentsFormatting for else blocks by @nulls in https://github.com/saveourtool/diktat/pull/1743
- Fixed IdentifierNaming by @nulls in https://github.com/saveourtool/diktat/pull/1746
- Fixed KdocMethods by @DrAlexD in https://github.com/saveourtool/diktat/pull/1757
- Fixed IndentationRule by @DrAlexD in https://github.com/saveourtool/diktat/pull/1760
- Fixed KdocComments by @DrAlexD in https://github.com/saveourtool/diktat/pull/1754
- Fixed LineLength by @DrAlexD in https://github.com/saveourtool/diktat/pull/1759
- Fix for a NO_BRACES_IN_CONDITIONALS_AND_LOOPS failure within variable initialization block by @DrAlexD in https://github.com/saveourtool/diktat/pull/1739
- Fixed warning
FUNCTION_BOOLEAN_PREFIX
onoperator fun
by @diphtongue in https://github.com/saveourtool/diktat/pull/1767 - Fixed
KdocComments
for types in generic classes by @DrAlexD in https://github.com/saveourtool/diktat/pull/1832 - Fixed BracesInConditionalsAndLoopsRule and added tests by @DrAlexD in https://github.com/saveourtool/diktat/pull/1750
- Fixed
VARIABLE_NAME_INCORRECT_FORMAT
false positive when a property has a backing field by @diphtongue in https://github.com/saveourtool/diktat/pull/1810 - Fixed bug related to assigning to declared vals inside null-check branches by @DrAlexD in https://github.com/saveourtool/diktat/pull/1851
- Fixed false positive
MISSING_KDOC_ON_FUNCTION
on local function (function inside another function) by @diphtongue in https://github.com/saveourtool/diktat/pull/1848 - Fixed
WRONG_NEWLINES
rule to take into accountmaxCallsInOneLine
by @DrAlexD in https://github.com/saveourtool/diktat/pull/1858 - Fixed
CUSTOM_GETTERS_SETTERS
false positive when a property has a backing field by @diphtongue in https://github.com/saveourtool/diktat/pull/1815 KDOC_WITHOUT_THROWS_TAG
add@throws
annotation when throw inside try-catch by @diphtongue in https://github.com/saveourtool/diktat/pull/1862- Fixed duplicate
@property
generation for parameter with ' in name by @DrAlexD in https://github.com/saveourtool/diktat/pull/1873
New CLI Driver
- Diktat command by @nulls in https://github.com/saveourtool/diktat/pull/1649
- Diktat CLI runner by @nulls in https://github.com/saveourtool/diktat/pull/1653
- Wrap KtLint classes by @nulls in https://github.com/saveourtool/diktat/pull/1648
- Disabled additional rules from KtLint by @nulls in https://github.com/saveourtool/diktat/pull/1643
- Moved Diktat's implementation of KtLint's RuleSetProvider by @nulls in https://github.com/saveourtool/diktat/pull/1654
- Support a full path in DiktatReporter by @nulls in https://github.com/saveourtool/diktat/pull/1798
- Rewrite StreamGobbler by @nulls in https://github.com/saveourtool/diktat/pull/1692
- Return exit code 1 when not all errors are fixed by @nulls in https://github.com/saveourtool/diktat/pull/1868
- Updated arguments for
diktat-cli
by @nulls in https://github.com/saveourtool/diktat/pull/1860 - Fix CLI integration step in README by @Goooler in https://github.com/saveourtool/diktat/pull/1772
- Supported multiple reporters in diktat runner by @nulls in https://github.com/saveourtool/diktat/pull/1803
- Added script for Windows by @nulls in https://github.com/saveourtool/diktat/pull/1859
- Introduced
diktat-runner
by @nulls in https://github.com/saveourtool/diktat/pull/1813 - Fixed diktat-cli by @nulls in https://github.com/saveourtool/diktat/pull/1841
- Make diktat-cli executable by @nulls in https://github.com/saveourtool/diktat/pull/1843
- Use diktat-runner:shadow as variant by @nulls in https://github.com/saveourtool/diktat/pull/1875
New Gradle and Maven plugins
- Fat jar for gradle plugin by @nulls in https://github.com/saveourtool/diktat/pull/1794
- Supported multiple reporters in maven by @nulls in https://github.com/saveourtool/diktat/pull/1824
- Support ANT-like glob patterns by @nulls in https://github.com/saveourtool/diktat/pull/1856
- Fixed maven plugin by @nulls in https://github.com/saveourtool/diktat/pull/1816
Diktat Testing
- Enhance smoke tests by @nulls in https://github.com/saveourtool/diktat/pull/1766
- Enhance tests in diktat by @nulls in https://github.com/saveourtool/diktat/pull/1780
- Fixed smoke tests by @nulls in https://github.com/saveourtool/diktat/pull/1769
- Enhancements for tests by @nulls in https://github.com/saveourtool/diktat/pull/1644
- Moved tests with CLI from GitHub actions to JUnit test by @nulls in https://github.com/saveourtool/diktat/pull/1784
- Remove
diktat-test-framework
by @nulls in https://github.com/saveourtool/diktat/pull/1785
Infra changes
- Migration to Gradle by @nulls in https://github.com/saveourtool/diktat/pull/1625
- Added a placeholder for years by @nulls in https://github.com/saveourtool/diktat/pull/1640
- Diktat API by @nulls in https://github.com/saveourtool/diktat/pull/1655
- Reused 'DiktatProcessor' for inline fix and check by @nulls in https://github.com/saveourtool/diktat/pull/1657
- Migration to Kotlin's imports by @nulls in https://github.com/saveourtool/diktat/pull/1659
- Publish
dependencies
on GitHub by @nulls in https://github.com/saveourtool/diktat/pull/1662, https://github.com/saveourtool/diktat/pull/1663, https://github.com/saveourtool/diktat/pull/1664, https://github.com/saveourtool/diktat/pull/1665 - Removed usage of
GrgitServicePlugin
by @nulls in https://github.com/saveourtool/diktat/pull/1682 - Updating the package name to the new one by @akuleshov7 in https://github.com/saveourtool/diktat/pull/1687
- Diktat rule configs by @nulls in https://github.com/saveourtool/diktat/pull/1686
- Removed close outputStream as separate listener by @nulls in https://github.com/saveourtool/diktat/pull/1688
- Refactored
warn
andwarnAndFix
inWarnings
by @nulls in https://github.com/saveourtool/diktat/pull/1751 - Migration to new package in Maven Central by @nulls in https://github.com/saveourtool/diktat/pull/1744
- Migrated smoke test to diktat cli by @nulls in https://github.com/saveourtool/diktat/pull/1782
- Fix release to maven central by @nulls in https://github.com/saveourtool/diktat/pull/1788
- Supported release to plugins.gradle.org by @nulls in https://github.com/saveourtool/diktat/pull/1789
- Fixed step.id by @nulls in https://github.com/saveourtool/diktat/pull/1790
- Support configuration of reporters in DSL by @nulls in https://github.com/saveourtool/diktat/pull/1808
- Remove dependency to mockito-all by @nulls in https://github.com/saveourtool/diktat/pull/1811
- Fix mergeDiktatReports by @nulls in https://github.com/saveourtool/diktat/pull/1812
- Avoid changing newlines by @nulls in https://github.com/saveourtool/diktat/pull/1830
- Added shadow for diktat-runner by @nulls in https://github.com/saveourtool/diktat/pull/1834
- Support running diktat without configuration by @nulls in https://github.com/saveourtool/diktat/pull/1837
- Refactor
fun isPairPropertyBackingField
usingPSI
by @diphtongue in https://github.com/saveourtool/diktat/pull/1857 - Fixed release.yml by @nulls in https://github.com/saveourtool/diktat/pull/1861
- Rewrote adoc to markdown by @nulls in https://github.com/saveourtool/diktat/pull/1867
- Support virtual path in DiktatProcessor by @nulls in https://github.com/saveourtool/diktat/pull/1874
Dependencies Updates
- Update Kotlin and core dependencies to v1.9.21 by @renovate in https://github.com/saveourtool/diktat/pull/1651, https://github.com/saveourtool/diktat/pull/1669, https://github.com/saveourtool/diktat/pull/1870, https://github.com/saveourtool/diktat/pull/1763.
- Update Ktlint to v1.0.1 by @renovate in https://github.com/saveourtool/diktat/pull/1683, https://github.com/saveourtool/diktat/pull/1729, https://github.com/saveourtool/diktat/pull/1763
- Update all non-major dependencies (except core Kotlin) to v6.18.0 by @renovate in https://github.com/saveourtool/diktat/pull/1652, v8.2 by @renovate in https://github.com/saveourtool/diktat/pull/1704, v8.2.1 by @renovate in https://github.com/saveourtool/diktat/pull/1713, v8.3 by @renovate in https://github.com/saveourtool/diktat/pull/1722, v8.4 by @renovate in https://github.com/saveourtool/diktat/pull/1762, v8.5 by @renovate in https://github.com/saveourtool/diktat/pull/1846
- Update plugin com.gradle.plugin-publish to v1.2.0, com.gradle.enterprise to v3.16.1, talaiot-base to v2 by @renovate in https://github.com/saveourtool/diktat/pull/1660, https://github.com/saveourtool/diktat/pull/1871, https://github.com/saveourtool/diktat/pull/1735
- Update plugin org.gradle.toolchains.foojay-resolver-convention to v0.6.0 by @renovate in https://github.com/saveourtool/diktat/pull/1715
- Update mikepenz/gradle-dependency-submission action to v0.9.1 by @renovate in https://github.com/saveourtool/diktat/pull/1714, https://github.com/saveourtool/diktat/pull/1771
- Update peter-evans/create-pull-request action to v5 by @renovate in https://github.com/saveourtool/diktat/pull/1676
- Update dependency com.google.devtools.ksp:symbol-processing-api to v1.8.20 by @renovate in https://github.com/saveourtool/diktat/pull/1669
- Update dependency io.github.microutils:kotlin-logging to v3 by @renovate in https://github.com/saveourtool/diktat/pull/1681
- Update dependency com.github.johnrengelman.shadow to v8 by @renovate in https://github.com/saveourtool/diktat/pull/1678
- Update dependency com.google.guava:guava to v32, v32.1.3-jre by @renovate in https://github.com/saveourtool/diktat/pull/1677, https://github.com/saveourtool/diktat/pull/1764
- Update actions/checkout action to v4 by @renovate in https://github.com/saveourtool/diktat/pull/1730, https://github.com/saveourtool/diktat/pull/1756
- Update all github actions (major) by @renovate in https://github.com/saveourtool/diktat/pull/1872
- Update actions/setup-java action to v4 by @renovate in https://github.com/saveourtool/diktat/pull/1852
New Contributors
- @DrAlexD made their first contribution in https://github.com/saveourtool/diktat/pull/1739
- @diphtongue made their first contribution in https://github.com/saveourtool/diktat/pull/1767
- @Goooler made their first contribution in https://github.com/saveourtool/diktat/pull/1772
Full Changelog: https://github.com/saveourtool/diktat/compare/v1.2.5...v2.0.0