github detekt/detekt v1.18.0-RC3

latest releases: v1.23.6, v1.23.5, v1.23.4...
2 years ago

1.18.0-RC3 - 2021-08-05

Notable Changes

  • We've added two new rules: AvoidReferentialEquality and BooleanPropertyNaming (see #3924 and #3795)
  • This version of Detekt ships with Kotlin 1.5.21, and we're compiling with apiVersion set to 1.4 - #3956 and #3852
  • The minimum version of Gradle to use Detekt Gradle Plugin is now 6.1 - #3830
  • This version of Detekt has been tested against Java 16 - #3698
  • We fixed a long-standing bug related to parallel execution (#3248) - #3799 and #3822
  • We now use multi-line format for list options in the default detekt config file - #3827
  • The rule VarCouldBeVal has been updated and now works only with type resolution to provide more precise findings - #3880
  • We removed all the references to Extensions.getRootArea that is now deprecated from our codebase. This was affecting users with sporadic crashes. - #3848

Migration

  • We renamed the input property inside the detekt{} extension of the Gradle plugin to source. The input property has been deprecated, and we invite you to migrate to the new property (see #3951)
// BEFORE
detekt {
    input = files(...)
}

// AFTER
detekt {
    source = files(...)
}
  • For custom rule authors: we finished the rework to use the annotations in custom rules. Specifically configurations should be configured with @Configuration and a config delegate (see #3891) while auto-correction capability should be specified with the @AutoCorrectable annotation #3820.

  • For custom rule authors: This will be the last version of detekt where we publish the detekt-bom artifact. This change should not affect anyone. If it affects you, please let us know.

Changelog

  • ClassNaming: Don't treat Kotlin syntax ` as part of class name - #3977
  • IgnoredReturnValue: fix false negative when annotation is on the class - #3979
  • NoNameShadowing: fix false positive with nested lambda has implicit parameter - #3991
  • UnusedPrivateMember - added handling of overloaded array get operator - #3666
  • Publish bundled/Shadow JAR artifact to Maven repos - #3986
  • EmptyDefaultConstructor false positive with expect and actual classes - #3970
  • FunctionNaming - Allow factory function names - fix #1639 - #3973
  • EndOfSentenceFormat - Fix #3893 by only calling super.visit once - #3904
  • UndocumentedPublicFunction: don't report when nested class is inside not public class #3962
  • Fail with a meaningful error message for invalid boolean - #3931
  • UndocumentedPublicProperty and UndocumentedPublicFunction should include objects - #3940
  • Fix exclusion pattern for InvalidPackageDeclaration - #3907
  • Allow else when {...} in MandatoryBracesIfStatements rule - #3905
  • Remove unnecessary constant declaration - #3903
  • Check bindingContext only once in MemberNameEqualsClassName - #3899
  • LongMethod: add 'ignoreAnnotated' configuration option - #3892
  • Fix Deprecation rule message - #3885
  • Improve LongParameterList rule by supporting ignoring annotated parameters - #3879
  • OptionalUnit: fix false positive when function initializer is Nothing type - #3876
  • UnnecessaryParentheses: fix false positive for delegated expressions - #3858
  • Fix UnnecessaryLet false positive in inner lambdas - #3841
  • Fix false positive for UnusedPrivateMember - Backtick identifiers - #3828
  • Properly apply test excludes for comments - #3815
  • Fix generation issues around (deprecated) list properties - #3813
  • Update the implementation of ClassOrdering to handle false negatives - #3810
  • [comments] Do not exclude tests globally - #3801
  • UnnecessaryLet: report when implicit parameter isn't used - #3794
  • NoNameShadowing: don't report when implicit 'it' parameter isn't used - #3793
  • Fix ModifierOrder to support value class - #3719
  • Remove inline value class to stay compatible with Kotlin 1.4 API - #3871
  • [FunctionNaming] Revert annotations that are ignored by default - #3948
  • Android: add javac intermediates to classpath - [#3867]((#3867)
  • Revert "Android: add javac intermediates to classpath (#3867)" - [#3958]((#3958)
  • Use annotations to configure rules in detekt-rules-exceptions - #3798
  • Use @configuration in detekt-rules-style - #3774
  • Use annotations to configure rules in custom-checks - #3773
  • Use @configuration for rules-errorprone - #3772
  • Use annotation to configure rules in rules-empty - #3771
  • Use annotation to configure rules in rules-documentation - #3770
  • Use annotations to configure rules in rules-naming - #3769
  • Use annotations to configure rules in rules-complexity - #3768
  • Move formatting rules to @configuration - #3847

Dependency Updates

  • Bump Kotlin to 1.5.21 - #3956
  • Revert "Bump Kotlin to v1.5.20" - #3941
  • Bump Kotlin to v1.5.20 - #3921
  • Kotlin 1.5.10 - #3826
  • Update assertj to v3.20.2 - #3912
  • Update snakeyaml to v1.29 - #3911
  • Bump byte-buddy from 1.11.2 to 1.11.5 - #3886
  • Bump byte-buddy from 1.11.1 to 1.11.2 - #3872
  • Bump byte-buddy from 1.11.0 to 1.11.1 - #3861
  • Update mockk to 1.12.0 - #3937

Housekeeping & Refactorings

  • Enable UseEmptyCounterpart for detekt code base - #4000
  • enable coroutine rules for detekt code base - #3994
  • Remove "plugin" suffix from version catalog aliases - #3987
  • Fix ClassCastException in test on java 11 openjdk9 - #3984
  • Activate IgnoredReturnValue on detekt code base - #3974
  • Add missing test in FunctionNaming - #3976
  • Fix trunk compilation - #3968
  • Reformat internal detekt.yml using multi line lists - #3936
  • Increase memory available to gradle integration test daemon - #3938
  • Avoid empty lines when running detekt with type resolution - #3909
  • Fix java.lang.ClassCastException is reading default yaml config - #3920
  • Refactor + rename util function inside MandatoryBracesIfStatement rule - #3908
  • Rename Tests to Spec - #3906
  • verify that no rule is configured with kdoc tags - #3870
  • Setup FOSSA - #3836
  • jvmTarget can't be null - #3818
  • Add test for ruleset provider configuration - #3814
  • Merge JaCoCo coverage reports the "right" way - #3650
  • Update outdated Gradle plugin documentation regarding source files - #3883
  • Make documentation more precise about how rules are enabled - #3889
  • Rename MapGetWithNotNullAsserSpec to follow test convention - #3878
  • Remove custom assertions that check kdoc of rules - #3859
  • Avoid overlapping outputs - #3790
  • Revert "Avoid overlapping outputs" - #3943

See all issues at: 1.18.0

Don't miss a new detekt release

NewReleases is sending notifications on new releases.