Skip to content

Releases: saveourtool/diktat

Release 0.2.0

29 Dec 10:26
e2df0c8
Compare
Choose a tag to compare

Hightlihts

A lot of bugfixes, improved testing process. Diktat now better follow semver versioning.

Features

  • 6ea31f7 Feature. Recommendation 6.4.2: Objects should be used for Stateless Interfaces
  • 8baf3d8 Null safety in NewlinesRule (#634)

Bugfixes

  • 791413b Bugfix. FP EMPTY_BLOCK_STRUCTURE_ERROR on SAM overrides
  • d690c0f Fixes for FileStructureRule (#636)
  • 4edbd78 Bugfix. CommentsRule doesn't detect commented out class declaration (#630)
  • c1c8d2d Bugfix. FP of LOCAL_VARIABLE_EARLY_DECLARATION with other variables and a loop (#635)
  • 2a29553 Correct order in ClassLikeStructursOrderRule (#637)
  • 12af2ac FP in AnnotationNewLineRule with comment (#629)
  • e38ee59 Bugfix. A lot of FP LOCAL_VARIABLE_EARLY_DECLARATION (#642)
  • f6786c2 Bugfix. Newline rule rbrace(#617) (#650)
  • 4fdf376 Fix for incorrect variable name handle (#646)
  • dcd1433 Bugfix. Broken autofix for top-level block comment with multiline text (#661)
  • ee08aa4 Bugfix. CommentedCode when text inside block comment may be interpreted as KDoc (#664)
  • 26c838e Added fix in AnnotationNewLineRule (#662)
  • 2faaefc BugFix. Incorrect warning of LONG_NUMERICAL_VALUES_SEPARATED. (#660)
  • ac8bcb0 Bugfix. When changing indentation of multiline string, all lines should be changed (#670)
  • e2df0c8 DataClassesRule shouldn't trigger when no property in constructor (#671)

Documentation

Housekeeping

Dependency updates

  • 3efb993 Bump kotlin.version from 1.4.20 to 1.4.21 (#638)
  • 9b853b1 (feature/check-rules-are-commented#470) Bump detekt-maven-plugin from 1.14.2 to 1.15.0 (#669)

Release 0.1.7

10 Dec 13:43
e9bda99
Compare
Choose a tag to compare

This is bugfix-only release

This release fixes a bug in diktat-gradle-plugin. All other components are same as in 0.1.6.

  • Fixed bug with handling inputs property in diktat-gradle-plugin on Linux (#627)
  • Introduced functional tests for diktat-gradle-plugin

Release 0.1.6

09 Dec 09:47
d2223c5
Compare
Choose a tag to compare

Release highlights

*Diktat checks it's own code

  • 3 new rules
  • a lot of bugfixes

New features

  • d8651d2 Rule 6.1.3 Do not use the primary constructor if it is empty and has no sense (#528)
  • 4ab49e1 Rule 6.1.7 implicit backing property(#443) (#465)
  • 89873bb Mechanism to exclude files from check (#563)
  • 11d2c4c diktat-analysis.yml can be read from a path, where jar is stored (#588)
  • fefe2fd Changing functionality for AVOID_NULL_CHECK (#564)
  • 80cad9d Rule 6.4.1: Avoid using utility classes/objects (#508)
  • 312bab6 No trigger on individual tag without KDoc (#583)
  • ac92d54 KDoc check property in class (#598)

Bugfixes

  • 205dbfc Removing complex cases from the warning related to null checks (#532)
  • 3888e94 Bugfix. ClassCastException in IndentationRule when blank line is added after @implNote tag in KDoc (#527)
  • 0bf93cf Bugfix. Newline at the beginning of code block is not removed if there are more than one (#537)
  • a1ccdbd WhiteSpaceRule after NewlinesRule (#549)
  • 0dd9f90 different functions due to semicolon (#557)
  • cd83754 Bugfix. False-positive LOCAL_VARIABLE_EARLY_DECLARATION (#535)
  • 0bc75c8 bugfix/make-kdoc-functions-not-mandatory(#551) (#565)
  • 3e91e26 Wrong braces with comments (#540)
  • 07829e0 Private property in KDoc (#575)
  • 047ad05 Fix for #585 - false positive NO_BRACES_IN_CONDITIONALS_AND_LOOPS when there is a comment in when entry (#591)
  • 4ce391a Bugfix. Comments should be indented as the code they are commenting (#566)
  • 2349037 hotfix: NPE in IndentationRule on last comment in code block (#595)
  • 6d4a8ef Bugfix. KdocMethod should not raise warning on override fun (#594)
  • 078b6d7 Bugfix. Lambda passed as an argument is forced to be on the same line as the previous argument (#545)
  • 27b7973 Overridden functions are excluded from FUNCTION_BOOLEAN_PREFIX (#567)
  • dc1ba8d Removing transitive dependency on kotlinpoet (#584)
  • 592031c Bugfix. NPE in indentation rule(#555) (#596)
  • 6d31422 Fix handling empty inputs in diktat-gradle-plugin (#611)
  • 0af6e32 function style bug in NewlinesRule (#580)
  • ca50c60 Fix for ArrayIndexOutOfBoundsException in #371 (#612)
  • ac07d98 Bugfix. CompactInitializationRule builds incorrect tree(#599) (#600)
  • d2223c5 Removed file path from warning messages (#621)

Docs

Housekeeping

Dependency updates

  • 090e575 Bump kotlin.version from 1.4.10 to 1.4.20 (#562)
  • 9224019 Bump junit in diktat-maven-plugin from 3.8.2 to 4.13.1 (#590)
  • 4e16a72 Bump dokka-maven-plugin from 1.4.10 to 1.4.20 (#465)

Release 0.1.5

18 Nov 12:01
73a96ea
Compare
Choose a tag to compare

This is a bugfix-only release

This release fixes #544 which causes troubles when using gradle plugin with debug = false. If you are using diktat-gradle-plugin, we suggest to upgrade to 0.1.5 ASAP.

Release 0.1.4

17 Nov 11:35
c2c47fb
Compare
Choose a tag to compare

Release highlihts

  • diktat-gradle-plugin is released
  • 5 new rules

New features

  • Rule 6.1.1 Primary constructor should be defined implicitly in the declaration of class (#435)
  • Recommendation 6.1.10 no tivial getters or setters are allowed (#499)
  • Support kotlin multiplatform project layout in PackageNaming rule (#516)
  • Adding rule 6.1.8 regarding getters and setters (#518)
  • Rule 6.1.11 - Use apply for object initialization (#491)
  • Rule 6.1.5: Explicit supertype qualification should not be used if there is not clash between called methods (#458)
  • Do not require configuration for every rule in yml file (#520)
  • diktat-gradle-plugin (#514)
  • Rule 6.2.2(#447) (#501)
  • Adding rule 4.3.3 related to null-checks (#522)

Bugfixes

  • Confusing warning message in KDOC_NO_CONSTRUCTOR_PROPERTY (#497)
  • Bugfix. Do not check KDoc on method main (#509)
  • bugfix/extension-function-kdoc(#489) (#507)
  • Bugfix. NPE in TrivialPropertyAccessors rule (#512)
  • Fix for #415 - WHEN_WITHOUT_ELSE doesn't recognize when expression in when branch (#450)
  • Change generic-type algorithm (#536)
  • Bugfix for release configs (#539)
  • NPE is ASTNode.squeezeSpaces method (#500)
  • NPE in BlockStructureBraces (#502)
  • Bugfix. Unhandled ArrayStoreException when string template has [] operator inside (#513)

Docs

  • Improve Gradle snippet (Readme) (#506)
  • Adding examples to the diktat (#523)
  • Coding guide, chapter 1 after Native review (#466)
  • Adding chapters 2 and 3 after the native review (#494)
  • Cosmetic changes to a codestyle (#495)
  • Fixes for chapters 4-5 after native review. (#496)

Housekeeping

  • Fixing diktat functional test (#487)
  • Making diktat consistent with own code style (rules.kdoc + diktat-rules tests) (#485)
  • Use GITHUB_ENV file instead of set-env command (#534)

Dependencies

  • Update versions in pom.xml and documentation after 0.1.3 release (#469)
  • Bump kotlinx-serialization from 1.0.0 to 1.0.1 (#473)
  • Bump kaml from 0.25.0 to 0.26.0 (#503)
  • Bump whelk-io/maven-settings-xml-action from v12 to v14 (#525)

Release 0.1.3

31 Oct 14:11
b08f9d8
Compare
Choose a tag to compare

Release highlights

  • diktat migrated to kotlin 1.4 (#389)
  • diktat migrated from jackson to kotlinx.serialization (#393)
  • 7 new rules, 6th chapter of codestyle introduced

New features

  • 5eca888 Rule 5.2.3 Use default values for function arguments instead of overloading them (#370)
  • 20cb97b Suggest using @Property tag in KDoc (#332)
  • f57a88b ENUM_VALUE styles support: snakeCase/pascalCase (#408)
  • d8e8b2d Recommendation 3.1 - recommended order of imports (#380)
  • d0ab9f9 Recommendation 4.2.1 smart casts
  • 036f18a Rule 6.1.9 (#434)
  • 3ea3348 Rule 6.1.2. Prefer data classes instead of classes without any functional logic
  • f28dfb9 Rule 6.1.6 abstract classes should have at least one abstract method (#457)
  • fa9a4fc Rule 6.1.4 several init blocks are redundant and generally should not be used in your class (#459)

Fixes

  • Improving variable search mechanism (#352)
  • dcc073b Wildcard without "import" word (#392)
  • a6b5e1e Fixed issue #405 in WhiteSpaceRule (#412)
  • 2180e77 Fixing bug with lineNumber in autocorrect mode (#400)
  • 4576e59 Check backticks only in symbol declarations (#399)
  • a9e5a56 Validate warning names in config file on startup (#396)
  • 4a6060d Correctly handle prefix and postfix operators in WhiteSpaceRule (#416) (#437)
  • 6852628 Fix for issue #407 - no newline between consecutive braces in autocorrect mode (#463)
  • 2d9e88e (bugfix/arraystore#406) String template curly braces bugfix (#427)
  • b08f9d8 (tag: v0.1.3) Fixing DiktatRuleSet crashes when there are no package and no imports (#464)
  • e273989 Added logic for parameters and supertypes lists to NewlinesRule (#431)
  • f3da291 BlockStructureBraces assertion failed (#461)

Docs

Housekeeping

  • 3fa9105 Make diktat consistent with own code style (#404)
  • 906fe1c Refactored diktat-maven-plugin build to speed up CI builds (#410)
  • 2175cb9 Remove deprecated calculateLineColByOffset methods from Ktlint (#394)

Dependencies

Release 0.1.2

13 Oct 08:00
1303570
Compare
Choose a tag to compare

Release higlights

  • diktat-maven-plugin released
  • 7 new rules supported

New features

  • Rule 5.1.2: Avoid deep nesting of function code blocks (#348)
  • Rule 5.1.3 avoid nested functions
  • Rule 5.2.1 lambda parameters order (#360)
  • Rule 4.1.2: Numbers of a float type should not be directly compared (#323)
  • Rule 5.2.2 parameters size (#359)
  • diktat-maven-plugin (#286)
  • Recommendation 4.3.1 avoid nullable types (#296)
  • Rule 5.1.1 (#341)

Fixes

  • Bugfixes in Indentation Rule (#376)
  • Wrong newlines in functional style (#346)
  • bugfix/suppress-bug(#372) (#375)
  • Bugfix in IndentationRule (#343) (#350)
  • Bugfix in WRONG_WHITESPACE inspection (#347)

Housekeeping

  • Bump whelk-io/maven-settings-xml-action from v9 to v12 (#368)
  • Bump maven-plugin-annotations from 3.5.2 to 3.6.0 (#369)
  • Github workflow enhancements (#366)
  • Update README.md (#363)
  • Bump detekt-maven-plugin from 1.13.1 to 1.14.0 (#354)
  • Bump jackson.version from 2.11.2 to 2.11.3 (#355)
  • Update versions in pom.xml and documentation after 0.1.1 release (#353)
  • Create codeql-analysis.yml

Release 0.1.1

05 Oct 01:13
3a38311
Compare
Choose a tag to compare

New features

  • Rule 4.1.3 Try to use 'val' instead of 'var' for variable declaration (#328)
  • Handling custom property accessors in formatting rules (#337)
  • Recommendation 4.3.2 generic types explicit declaration (#314)
  • Rule 2.6
  • Rule 4.1.1 - precise arithmetic with float values (#303)
  • Rule 3.14.2 string template format (#305)
  • Check if copyright year is valid (#270)
  • Chapter 5 introduced (#308)
  • Recommendation 4.2.2 type alias (#288)
  • Suppress in individual files (#255)
  • Implementation of recommendation 3.10 - local variables declaration (#214)
  • Chapter 4 of Kotlin codestyle (#273)

Fixes

  • Assignment operator increases indent with extended option (#338)
  • bugfix/header-missing-for-single-object (#340)
  • Added handling of annotated properties to BLANK_LINE_BETWEEN_PROPERTIES (#331)
  • Trim multiline text in warnings (#322)
  • #315 Configurable indentation size. (#316)
  • Type alias wrong trigger (#319)
  • Cover cases missing in recommendation 3.7 (#287)
  • Fixing NPE in package naming (#300)
  • Documentation on symbols in test classes (#271)

Housekeeping

  • Fixing smoke test (#342)
  • Fixes bug in functional_tests.yml (#345)
  • Bump dokka-maven-plugin from 1.4.0 to 1.4.10 (#329)
  • Bump java-diff-utils from 4.7 to 4.8 (#330)
  • Making diktat consistent with own code style (#318)
  • Add functional tests for diktat (#312)
  • Update RulesConfigYamlTest (#307)
  • WildCards Import add documentation (#281)
  • Bump jacoco-maven-plugin from 0.8.5 to 0.8.6 (#309)
  • Initialized diktat smoke tests (#234)
  • Added classPath argument to detekt plugin, fixed detected issues (#238)
  • Updating readme (#298)
  • Bump detekt-maven-plugin from 1.11.0 to 1.13.1 (#274)
  • Bump junit-jupiter from 5.6.2 to 5.7.0 (#276)
  • Bump commons-io from 2.7 to 2.8.0 (#275)
  • Update versions in pom.xml and documentation after 0.1.0 release (#280)

Release 0.1.0

14 Sep 07:44
ceeb2d9
Compare
Choose a tag to compare

Initial release that is available in maven-central.

Release 0.0.4

10 Sep 15:17
Compare
Choose a tag to compare
Making diktat consistent with own code style

### What's done:
* Code style