Releases: detekt/detekt
Releases · detekt/detekt
v1.18.0-RC2
2021-07-16
Notable Changes
- This version of Detekt ships with Kotlin
1.5.21, and we're compiling withapiVersionset to1.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
VarCouldBeValhas been updated and now works only with type resolution to provide more precise findings - #3880 - We removed all the references to
Extensions.getRootAreathat is now deprecated from our codebase. This was affecting users with sporadic crashes. - #3848 - We continued the work to introduce annotations to declare rules metadata. Specifically the
@Autocorrectannotation has been added - #3820
Changelog
- 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
- 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
v1.18.0-RC1
1.18.0-RC1 - 2021-07-08
Notable Changes
- This version of Detekt ships with Kotlin
1.5.x, and we're compiling withapiVersionset to1.4- #3718 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
VarCouldBeValhas been updated and now works only with type resolution to provide more precise findings - #3880 - We removed all the references to
Extensions.getRootAreathat is now deprecated from our codebase. This was affecting users with sporadic crashes. - #3848 - For Android projects using Detekt Gradle plugins, we now add javac intermediates to classpath. This will allow running more precise type resolutions inspections - #3867
- We continued the work to introduce annotations to declare rules metadata. Specifically the
@Autocorrectannotation has been added - #3820
Changelog
- 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
- 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
- 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
Housekeeping & Refactorings
- 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
See all issues at: 1.18.0
v1.17.1
- 2021-05-19
Notable Changes
This is a patch release for Detekt 1.17.0 including fixes that we considered worth a point release.
Specifically, we're reverting a change on our Gradle Plugin. The original change #3655 resulted in several false positives when using rules with Type Resolution on Java/Kotlin mixed codebases.
Moreover we included a couple of false positive fixes for NoNameShadowing and UnnecessaryLet
Changelog
v1.17.0
- 2021-05-15
Notable Changes
- We're introducing our new Project logo :). See #3726
- This release allows you to replace your
jcenter()dependencies withmavenCentral()given that our dependency onkotlinx.htmlmigrated to Maven Central - See #3455 - We now introduced the
src/test/javaandsrc/test/kotlinby default for the plaindetektGradle task. If you use that task, you might notice rule reports in your test sourceset. See #3649 - We now default the baseline file to
detekt-baseline.xmlso you don't have to specify it manually. You can revert the previous behavior by setting the baseline tonull- See #3619 and #3745 - We enabled the SARIF output format by default - See #3543
- We're introducing annotations to provide metadata to rules, such as
@ActiveByDefault,@Configurationand@RequiresTypeResolution- See #3637 #3592 and #3579
Changelog
- Fix crash for DontDowncastCollectionTypes on Synthetic types - #3776
- We don't need to talk about jcenter anymore at our docs - #3755
- Skip publishing for detekt-cli shadowRuntimeElements variant - #3747
- Set the org.gradle.dependency.bundling attribute to external - #3738
- Support triple quoted strings in default value of config delegate - #3733
- Properly populate versions.properties - #3730
- We have a logo :) - #3726
- [UndocumentedPublicProperty] Allow inline comments for properties in primary constructor as documentation - #3722
- MultilineLambdaItParameter: don't report when lambda has no implicit parameter references - #3696
- Fix false positives for UnnecessaryFilter - #3695
- Add support for transformer function in config property delegate - #3676
- Add support for fallback property - #3675
- Ignore actual members in UnusedPrivateMember - #3669
- NamedArguments rule: fix false positive with trailing lambda - #3661
- Add DeprecatedBlockTag rule - #3660
- Noisy gradle - #3655
- Drop support to Gradle 5 - #3647
- Add MayBeConstant as alias for MayBeConst - #3644
- [ThrowingExceptionInMain] [ExitOutsideMainfix] fix for KtNamedFunction.isMainFunction() - #3641
- Fixing IllegalArgumentException in ForbiddenMethodCall rule for Intersection type parameters - #3626
- Replace getJetTypeFqName with fqNameOrNull extension - #3613
- New Rule: ObjectLiteralToLambda - #3599
- [MemberNameEqualsClassName] Support factory exemption for generic classes - #3595
- Refactor Analyzer so that RuleSetProvider.instance is only called once - #3585
- SarifOutputReportSpec: Correctly detect Windows root directory on local development machine - #3584
- Replace @SInCE KDoc tag with @SinceDetekt - #3582
- Simplify code in RedundantSuspendModifier rule - #3580
- Revert "Refactor Analyzer so that RuleSetProvider.instance is only called once" - #3578
- fix error message -> buildUponDefaultConfig instead of buildOnDefaultConfig - #3572
- UnnecessaryApply: fix false positive when lambda has multiple member references - #3564
- Switch SARIF report off jackson - #3557
- Fix rules not appearing in the sarif output - #3556
- Refactor Analyzer so that RuleSetProvider.instance is only called once - #3555
- New Rule: DoubleMutabilityForCollection - #3553
- Adds a ForbiddenSingleExpressionSyntax rule - #3550
Dependency Updates
- Update to Gradle 7.0.1 - #3760
- Update Shadow plugin to 7.0.0 - #3759
- Upgrade to AGP 4.2.0 - #3744
- JaCoCo 0.8.7 - #3739
- Upgrade to GitHub-native Dependabot - #3716
- Upgrade to Gradle 7 - #3689
- Bump com.gradle.plugin-publish from 0.13.0 to 0.14.0 - #3654
- Bump kotlin-reflect from 1.4.0 to 1.4.32 - #3627
- Upgrade to ktlint 0.41.0 - #3624
- Update to Kotlin 1.4.32 - #3606
- Bump AGP from 4.1.2 to 4.1.3 - #3589
- Bump mockk from 1.10.6 to 1.11.0 - #3588
Housekeeping & Refactorings
- Fix document - #3765
- Fix kdoc link on blog navigation - #3761
- Upload any heap dumps produced during CI build - #3758
- Always run warningsAsErrors on CI - #3754
- Clean ci - #3753
- Revert "Set the org.gradle.dependency.bundling attribute to external" - #3750
- Enable Gradle's type-safe project accessors - #3742
- Enable Gradle's version catalogs - #3741
- Ignore gradle plugin in codecov - #3740
- Update config file due to invalid argument - #3735
- Skip Multiplatform iOS tests if XCode is not configured - #3734
- Specify Java language level in module plugin - #3732
- Don't run unnecesary tasks - #3725
- Remove --stacktrace now that we have scan - #3724
- Drop JCenter usage from detekt's own build - #3711
- Publish build scans for all CI builds - #3710
- Remove deprecated kotlin-dsl Gradle config option - #3709
- Update to setup-java@v2 - #3704
- (Try to) improve CI build reliability - #3703
- Simplify UpdateVersionInFileTask - #3693
- Fix compilation issue in
:detekt-rules-style:compileTestKotlin- #3691 - Fix detekt failure in CI - #3674
- Refactor UnusedPrivateMemberSpec - #3667
- Warnings as errors - #3646
- Skip ios tests if no ci - #3635
- Fix tests - #3634
- Include detekt-rules on CLI runtime classpath - #3625
- Improve tests from :detekt-gradle-plugin - #3623
- Improve generator test coverage - #3622
- Improve tests - #3618
- Apply more formatting rules to our code - #3615
- Add negative test case for
requiresTypeResolution- #3614 - Simplify Gradle config - #3612
- Decouple Gradle projects - #3611
- Add --stacktrace to help triage CI flakiness - #3604
- Fix CI failure for deploy-snapshot - #3598
- Improve Deprecation and Documentation for allRules - #3596
- Update files to support
mainbranch in order to remove oppressive language - #3586 - Format test code for RedundantSuspen...
v1.17.0-RC3
- 2021-05-12
Notable Changes
- We're introducing our new Project logo :). See #3726
- This release allows you to replace your
jcenter()dependencies withmavenCentral()given that our dependency onkotlinx.htmlmigrated to Maven Central - See #3455 - We now introduced the
src/test/javaandsrc/test/kotlinby default for the plaindetektGradle task. If you use that task, you might notice rule reports in your test sourceset. See #3649 - We now default the baseline file to
baseline.xmlso you don't have to specify it manually. You can revert the previous behavior by setting the baseline tonull- See #3619 - We enabled the SARIF output format by default - See #3543
- We're introducing annotations to provide metadata to rules, such as
@ActiveByDefault,@Configurationand@RequiresTypeResolution- See #3637 #3592 and #3579
Changelog
- Fix kdoc link on blog navigation - #3761
- We don't need to talk about jcenter anymore at our docs - #3755
- Skip publishing for detekt-cli shadowRuntimeElements variant - #3747
- Set the org.gradle.dependency.bundling attribute to external - #3738
- Support triple quoted strings in default value of config delegate - #3733
- Properly populate versions.properties - #3730
- We have a logo :) - #3726
- [UndocumentedPublicProperty] Allow inline comments for properties in primary constructor as documentation - #3722
- MultilineLambdaItParameter: don't report when lambda has no implicit parameter references - #3696
- Fix false positives for UnnecessaryFilter - #3695
- Add support for fallback property - #3675
- Ignore actual members in UnusedPrivateMember - #3669
- NamedArguments rule: fix false positive with trailing lambda - #3661
- Add DeprecatedBlockTag rule - #3660
- Noisy gradle - #3655
- Drop support to Gradle 5 - #3647
- Add MayBeConstant as alias for MayBeConst - #3644
- [ThrowingExceptionInMain] [ExitOutsideMainfix] fix for KtNamedFunction.isMainFunction() - #3641
- Fixing IllegalArgumentException in ForbiddenMethodCall rule for Intersection type parameters - #3626
- Replace getJetTypeFqName with fqNameOrNull extension - #3613
- New Rule: ObjectLiteralToLambda - #3599
- [MemberNameEqualsClassName] Support factory exemption for generic classes - #3595
- Refactor Analyzer so that RuleSetProvider.instance is only called once - #3585
- SarifOutputReportSpec: Correctly detect Windows root directory on local development machine - #3584
- Replace @SInCE KDoc tag with @SinceDetekt - #3582
- Simplify code in RedundantSuspendModifier rule - #3580
- Revert "Refactor Analyzer so that RuleSetProvider.instance is only called once" - #3578
- fix error message -> buildUponDefaultConfig instead of buildOnDefaultConfig - #3572
- UnnecessaryApply: fix false positive when lambda has multiple member references - #3564
- Switch SARIF report off jackson - #3557
- Fix rules not appearing in the sarif output - #3556
- Refactor Analyzer so that RuleSetProvider.instance is only called once - #3555
- New Rule: DoubleMutabilityForCollection - #3553
- Adds a ForbiddenSingleExpressionSyntax rule - #3550
Dependency Updates
- Update to Gradle 7.0.1 - #3760
- Update Shadow plugin to 7.0.0 - #3759
- Upgrade to AGP 4.2.0 - #3744
- JaCoCo 0.8.7 - #3739
- Upgrade to GitHub-native Dependabot - #3716
- Upgrade to Gradle 7 - #3689
- Bump com.gradle.plugin-publish from 0.13.0 to 0.14.0 - #3654
- Bump kotlin-reflect from 1.4.0 to 1.4.32 - #3627
- Upgrade to ktlint 0.41.0 - #3624
- Update to Kotlin 1.4.32 - #3606
- Bump AGP from 4.1.2 to 4.1.3 - #3589
- Bump mockk from 1.10.6 to 1.11.0 - #3588
Housekeeping & Refactorings
- Upload any heap dumps produced during CI build - #3758
- Always run warningsAsErrors on CI - #3754
- Clean ci - #3753
- Revert "Set the org.gradle.dependency.bundling attribute to external" - #3750
- Enable Gradle's type-safe project accessors - #3742
- Enable Gradle's version catalogs - #3741
- Ignore gradle plugin in codecov - #3740
- Update config file due to invalid argument - #3735
- Skip Multiplatform iOS tests if XCode is not configured - #3734
- Specify Java language level in module plugin - #3732
- Don't run unnecesary tasks - #3725
- Remove --stacktrace now that we have scan - #3724
- Drop JCenter usage from detekt's own build - #3711
- Publish build scans for all CI builds - #3710
- Remove deprecated kotlin-dsl Gradle config option - #3709
- Update to setup-java@v2 - #3704
- (Try to) improve CI build reliability - #3703
- Simplify UpdateVersionInFileTask - #3693
- Fix compilation issue in
:detekt-rules-style:compileTestKotlin- #3691 - Fix detekt failure in CI - #3674
- Refactor UnusedPrivateMemberSpec - #3667
- Warnings as errors - #3646
- Skip ios tests if no ci - #3635
- Fix tests - #3634
- Include detekt-rules on CLI runtime classpath - #3625
- Improve tests from :detekt-gradle-plugin - #3623
- Improve generator test coverage - #3622
- Improve tests - #3618
- Apply more formatting rules to our code - #3615
- Add negative test case for
requiresTypeResolution- #3614 - Simplify Gradle config - #3612
- Decouple Gradle projects - #3611
- Add --stacktrace to help triage CI flakiness - #3604
- Fix CI failure for deploy-snapshot - #3598
- Improve Deprecation and Documentation for allRules - #3596
- Update files to support
mainbranch in order to remove oppressive language - #3586 - Format test code for RedundantSuspendModifierSpec - #3581
- Gradle tweaks - #3575
- Support Gradle config cache in detekt's build - #3574
- Show information from @Active in the website - #3569
- Update rule doc for SwallowedException config - #3547
- Markdown: Reintroduce...
v1.17.0-RC2
- 2021-05-04
Notable Changes
- This release allows you to replace your
jcenter()dependencies withmavenCentral()given that our dependency onkotlinx.htmlmigrated to Maven Central - See #3455 - We now introduced the
src/test/javaandsrc/test/kotlinby default for the plaindetektGradle task. If you use that task, you might notice rule reports in your test sourceset. See #3649 - We now default the baseline file to
baseline.xmlso you don't have to specify it manually. You can revert the previous behavior by setting the baseline tonull- See #3619 - We enabled the SARIF output format by default - See #3543
- We're introducing annotations to provide metadata to rules, such as
@ActiveByDefault,@Configurationand@RequiresTypeResolution- See #3637 #3592 and #3579
Changelog
- Properly populate versions.properties - #3730
- MultilineLambdaItParameter: don't report when lambda has no implicit parameter references - #3696
- Fix false positives for UnnecessaryFilter - #3695
- Ignore actual members in UnusedPrivateMember - #3669
- NamedArguments rule: fix false positive with trailing lambda - #3661
- Add DeprecatedBlockTag rule - #3660
- Noisy gradle - #3655
- Drop support to Gradle 5 - #3647
- Add MayBeConstant as alias for MayBeConst - #3644
- [ThrowingExceptionInMain] [ExitOutsideMainfix] fix for KtNamedFunction.isMainFunction() - #3641
- Fixing IllegalArgumentException in ForbiddenMethodCall rule for Intersection type parameters - #3626
- Replace getJetTypeFqName with fqNameOrNull extension - #3613
- [MemberNameEqualsClassName] Support factory exemption for generic classes - #3595
- Refactor Analyzer so that RuleSetProvider.instance is only called once - #3585
- SarifOutputReportSpec: Correctly detect Windows root directory on local development machine - #3584
- Replace @SInCE KDoc tag with @SinceDetekt - #3582
- Simplify code in RedundantSuspendModifier rule - #3580
- Revert "Refactor Analyzer so that RuleSetProvider.instance is only called once" - #3578
- fix error message -> buildUponDefaultConfig instead of buildOnDefaultConfig - #3572
- UnnecessaryApply: fix false positive when lambda has multiple member references - #3564
- Switch SARIF report off jackson - #3557
- Fix rules not appearing in the sarif output - #3556
- Refactor Analyzer so that RuleSetProvider.instance is only called once - #3555
- New Rule: DoubleMutabilityForCollection - #3553
- Adds a ForbiddenSingleExpressionSyntax rule - #3550
Dependency Updates
- Upgrade to GitHub-native Dependabot - #3716
- Upgrade to Gradle 7 - #3689
- Bump com.gradle.plugin-publish from 0.13.0 to 0.14.0 - #3654
- Bump kotlin-reflect from 1.4.0 to 1.4.32 - #3627
- Upgrade to ktlint 0.41.0 - #3624
- Update to Kotlin 1.4.32 - #3606
- Bump AGP from 4.1.2 to 4.1.3 - #3589
- Bump mockk from 1.10.6 to 1.11.0 - #3588
Housekeeping & Refactorings
- Update config file due to invalid argument - #3735
- Specify Java language level in module plugin - #3732
- Don't run unnecesary tasks - #3725
- Remove --stacktrace now that we have scan - #3724
- Drop JCenter usage from detekt's own build - #3711
- Publish build scans for all CI builds - #3710
- Remove deprecated kotlin-dsl Gradle config option - #3709
- Update to setup-java@v2 - #3704
- Simplify UpdateVersionInFileTask - #3693
- Fix compilation issue in
:detekt-rules-style:compileTestKotlin- #3691 - Fix detekt failure in CI - #3674
- Refactor UnusedPrivateMemberSpec - #3667
- Warnings as errors - #3646
- Skip ios tests if no ci - #3635
- Fix tests - #3634
- Include detekt-rules on CLI runtime classpath - #3625
- Improve tests from :detekt-gradle-plugin - #3623
- Improve generator test coverage - #3622
- Improve tests - #3618
- Apply more formatting rules to our code - #3615
- Add negative test case for
requiresTypeResolution- #3614 - Simplify Gradle config - #3612
- Decouple Gradle projects - #3611
- Add --stacktrace to help triage CI flakiness - #3604
- Fix CI failure for deploy-snapshot - #3598
- Improve Deprecation and Documentation for allRules - #3596
- Update files to support
mainbranch in order to remove oppressive language - #3586 - Format test code for RedundantSuspendModifierSpec - #3581
- Gradle tweaks - #3575
- Support Gradle config cache in detekt's build - #3574
- Show information from @Active in the website - #3569
- Update rule doc for SwallowedException config - #3547
- Markdown: Reintroduce double-backticks for inline code rendering - #3545
See all issues at: 1.17.0
v1.17.0-RC1
1.17.0-RC1 - 2021-05-01
Notable Changes
- This release allows you to replace your
jcenter()dependencies withmavenCentral()given that our dependency onkotlinx.htmlmigrated to Maven Central - See #3455 - We now introduced the
src/test/javaandsrc/test/kotlinby default for the plaindetektGradle task. If you use that task, you might notice rule reports in your test sourceset. See #3649 - We now default the baseline file to
baseline.xmlso you don't have to specify it manually. You can revert the previous behavior by setting the baseline tonull- See #3619 - We enabled the SARIF output format by default - See #3543
- We're introducing annotations to provide metadata to rules, such as
@ActiveByDefault,@Configurationand@RequiresTypeResolution- See #3637 #3592 and #3579
Changelog
- MultilineLambdaItParameter: don't report when lambda has no implicit parameter references - #3696
- Fix false positives for UnnecessaryFilter - #3695
- Deprecate configuration of reports in detekt Gradle extension - #3687
- Ignore actual members in UnusedPrivateMember - #3669
- NamedArguments rule: fix false positive with trailing lambda - #3661
- Add DeprecatedBlockTag rule - #3660
- Noisy gradle - #3655
- Drop support to Gradle 5 - #3647
- Add MayBeConstant as alias for MayBeConst - #3644
- [ThrowingExceptionInMain] [ExitOutsideMainfix] fix for KtNamedFunction.isMainFunction() - #3641
- Fixing IllegalArgumentException in ForbiddenMethodCall rule for Intersection type parameters - #3626
- Remove deprecated configurations and deprecate new ones - #3621
- Replace getJetTypeFqName with fqNameOrNull extension - #3613
- New Rule: ObjectLiteralToLambda - #3599
- [MemberNameEqualsClassName] Support factory exemption for generic classes - #3595
- Refactor Analyzer so that RuleSetProvider.instance is only called once - #3585
- SarifOutputReportSpec: Correctly detect Windows root directory on local development machine - #3584
- Replace @SInCE KDoc tag with @SinceDetekt - #3582
- Simplify code in RedundantSuspendModifier rule - #3580
- Revert "Refactor Analyzer so that RuleSetProvider.instance is only called once" - #3578
- fix error message -> buildUponDefaultConfig instead of buildOnDefaultConfig - #3572
- UnnecessaryApply: fix false positive when lambda has multiple member references - #3564
- Fix [ClassOrdering] to treat extensions properties as functions. - #3559
- Switch SARIF report off jackson - #3557
- Fix rules not appearing in the sarif output - #3556
- Refactor Analyzer so that RuleSetProvider.instance is only called once - #3555
- New Rule: DoubleMutabilityForCollection - #3553
- Adds a ForbiddenSingleExpressionSyntax rule - #3550
Dependency Updates
- Upgrade to GitHub-native Dependabot - #3716
- Upgrade to Gradle 7 - #3689
- Bump com.gradle.plugin-publish from 0.13.0 to 0.14.0 - #3654
- Bump kotlin-reflect from 1.4.0 to 1.4.32 - #3627
- Upgrade to ktlint 0.41.0 - #3624
- Update to Kotlin 1.4.32 - #3606
- Bump AGP from 4.1.2 to 4.1.3 - #3589
- Bump mockk from 1.10.6 to 1.11.0 - #3588
Housekeeping & Refactorings
- Remove --stacktrace now that we have scan - #3724
- Drop JCenter usage from detekt's own build - #3711
- Publish build scans for all CI builds - #3710
- Remove deprecated kotlin-dsl Gradle config option - #3709
- Update to setup-java@v2 - #3704
- Simplify UpdateVersionInFileTask - #3693
- Fix compilation issue in
:detekt-rules-style:compileTestKotlin- #3691 - Fix detekt failure in CI - #3674
- Refactor UnusedPrivateMemberSpec - #3667
- Warnings as errors - #3646
- Skip ios tests if no ci - #3635
- Fix tests - #3634
- Include detekt-rules on CLI runtime classpath - #3625
- Improve tests from :detekt-gradle-plugin - #3623
- Improve generator test coverage - #3622
- Improve tests - #3618
- Apply more formatting rules to our code - #3615
- Add negative test case for
requiresTypeResolution- #3614 - Simplify Gradle config - #3612
- Decouple Gradle projects - #3611
- Add --stacktrace to help triage CI flakiness - #3604
- Fix CI failure for deploy-snapshot - #3598
- Improve Deprecation and Documentation for allRules - #3596
- Update files to support
mainbranch in order to remove oppressive language - #3586 - Format test code for RedundantSuspendModifierSpec - #3581
- Gradle tweaks - #3575
- Support Gradle config cache in detekt's build - #3574
- Show information from @Active in the website - #3569
- Update rule doc for SwallowedException config - #3547
- Markdown: Reintroduce double-backticks for inline code rendering - #3545
See all issues at: 1.17.0
v1.16.0
- 2021-03-04
Notable Changes
Migration
Changelog
- Gradle Plugin tests should access also Maven Local - #3510
- Update Kotlin to version 1.4.31 - #3509
- Fix SARIF validation failure - #3507
- Remove off importing android util - #3506
- Adding support for full method signatures in ForbiddenMethodCall - #3505
- New rule: disallow to cast to nullable type - #3497
- Merge XML report output - #3491
- Allow using regular expressions when defining license header templates - #3486
- Add UnreachableCatchBlock rule - #3478
- Add NoNameShadowing rule - #3477
- Fix false negative "UselessCallOnNotNull" with
list.isNullOrEmpty()- #3475 - Add UseOrEmpty rule - #3470
- Add UseIsNullOrEmpty rule - #3469
- Add support to Kotlin Multiplatform Projects - #3453
- Fix false positives for MultilineLambdaItParameter.kt - #3451
- Dont generate baseline if empty - #3450
- Silence IndexOutOfBoundsException in getLineAndColumnInPsiFile() - #3446
- Add new ObjectExtendsThrowable rule - #3443
- Add allRules and deprecate failFast in gradle tasks - #3431
- Add two missing ktlint rules - #3430
- Don't fail if baseline doesn't exist in PlainDetekt - #3429
- Fix False Positive on
UnnecessarySafeCall- #3419 - Fix false positive for
UnusedPrivateMemberwith expect on objects - #3417 - Fix code samples for
UnnecessarySafeCall- #3416 - New rule: DontDowncastCollectionTypes - #3413
- Fix documentation in UnnecessarySafeCall - #3412
- Bump gradle from 4.1.1 to 4.1.2 - #3405
- Introduce --max-issues flag for cli - #2267 - #3391
- Ignore actual functions in FunctionOnlyReturningConstant (#3388) - #3390
- Fix hyperlink for elements of the type 'KtFile' - #3386
- Update gradle doc to show table of contents correctly - #3383
- Update cli doc to show table of contents correctly - #3382
- Fix EmptyConfig making all rules active in production - #3380
- Empty custom config enables rules disabled by default - #3379
- Add
setup-detektaction to README - #3373 - GlobalClassLoaderCache: move call to getFiles out of synchronized block - #3370
- Check for === instead of == - #3363
- Filter existing files in classpath - #3361
- Suppress RedundantVisibilityModifierRule if explicit API mode enabled - #3358
- Add the final new line in the baseline again - #3351
- [Security] Bump nokogiri from 1.10.10 to 1.11.1 in /docs - #3348
- Remove trailing newline after ending IndentingXMLStreamWriter - #3347
- [Security] Bump nokogiri from 1.10.10 to 1.11.0 in /docs - #3343
- Add UnnecessaryFilter rule - #3341
- Reorganize docs for the configuration file - #3337
- Add new rule SleepInsteadOfDelay - #3335
- Update Android Gradle Plugin to 4.1.1 - #3328
- Support relative output paths - #3319
- Fix
runLastOnRootbeing empty in KtLintMultiRule - #3318 - Ensure binary-compatibility with previous versrions - #3315
- Fix reports not propagated to detekt task with type resolution - #3313
- Support configurable severity per ruleset/rule in XML and Sarif output - #3310
- Configure default excludes for InvalidPackageDeclaration - #3305
- Remove exceptions of Library rules - #3304
- Move the questions to discussions - #3300
- Magic number extension functions - #3299
- NamedArguments: fix false positive with varargs - #3294
- NamedArguments rule: false positive with varargs - #3291
- NamedArguments with java code false positive - #3289
- Upgrade ktlint to 0.40.0 - #3281
- False positive "Unconditional loop jump" - #3280
- ForbiddenComments don't report TODO: in KDoc - #3273
- Add MultilineLambdaItParameter rule - #3259
- Update Kotlin to 1.4.21 - #3254
- Introduce --all-rules flag - #3253
- Enable more rules by default - #3229
- Running multiple Detekt tasks concurrently may cause deadlock - #3047
- detektMain is noisy "Ignoring a file detekt cannot handle" - #3019
- Configure default excludes for InvalidPackageDeclaration - #2539
- Hyperlink to error inside Android studio - #2340
- Align cli flags and defaults with other analysis tools - #2267
Housekeeping & Refactorings
- Move gradle testkit test back to test/ - #3504
- Add documentation on suppressing formatting rules - #3503
- Change DetektMultiplatform from unit test to gradle testkit integrati… - #3500
- Bump com.gradle.plugin-publish from 0.12.0 to 0.13.0 - #3494
- Refactor Gradle integration tests - #3489
- Refactor gradle integration test - #3487
- Prepare Detekt 1.16.0-RC2 - #3485
- Bump mockk from 1.10.5 to 1.10.6 - #3473
- Upgrade to Gradle 6.8.2 - #3468
- Correct
maxIssuesdocumentation - #3456 - Bump junit-platform-launcher from 1.7.0 to 1.7.1 - #3454
- Don't use deprecated functions - #3452
- Bump github-pages from 210 to 211 in /docs - #3434
- Add documentation for SARIF, severity and relative path - #3433
- Refactor uploading SARIF to report without overriding the previous step - #3432
- Fix
githubReleaseskipping assets - #3427 - Prompt bug reporters to attach gradle scan - #3422
- Fix invalid link in detekt html report - #3421
- Prepare 1.16.0-rc1 release - #3411
- Add full qualified name in documentation - #3410
- Bump kotlinx-coroutines-core from 1.3.8 to 1.4.1 - #3407
- Fix deploy website on master - #3406
- Bump mockk from 1.10.4 to 1.10.5 - #3404
- Bump assertj-core from 3.18.1 to 3.19.0 - #3403
- Bump github-pages from 209 to 210 in /docs - #3401
- Update dangling URLs pointing to the old website - #3400
- Auto generate CLI options in docs - #3399
- Update documentations on snapshots - [#3393](https://github.com/detekt...
v1.16.0-RC3
- 2021-02-19
Notable Changes
Migration
Changelog
- Add UnreachableCatchBlock rule - #3478
- Fix false negative "UselessCallOnNotNull" with
list.isNullOrEmpty()- #3475 - Add UseOrEmpty rule - #3470
- Add UseIsNullOrEmpty rule - #3469
- Fix false positives for MultilineLambdaItParameter.kt - #3451
- Dont generate baseline if empty - #3450
- Silence IndexOutOfBoundsException in getLineAndColumnInPsiFile() - #3446
- Add new ObjectExtendsThrowable rule - #3443
- Add allRules and deprecate failFast in gradle tasks - #3431
- Add two missing ktlint rules - #3430
- Don't fail if baseline doesn't exist in PlainDetekt - #3429
- Fix False Positive on
UnnecessarySafeCall- #3419 - Fix false positive for
UnusedPrivateMemberwith expect on objects - #3417 - Fix code samples for
UnnecessarySafeCall- #3416 - New rule: DontDowncastCollectionTypes - #3413
- Fix documentation in UnnecessarySafeCall - #3412
- Bump gradle from 4.1.1 to 4.1.2 - #3405
- Introduce --max-issues flag for cli - #2267 - #3391
- Ignore actual functions in FunctionOnlyReturningConstant (#3388) - #3390
- Fix hyperlink for elements of the type 'KtFile' - #3386
- Update gradle doc to show table of contents correctly - #3383
- Update cli doc to show table of contents correctly - #3382
- Fix EmptyConfig making all rules active in production - #3380
- Empty custom config enables rules disabled by default - #3379
- Add
setup-detektaction to README - #3373 - GlobalClassLoaderCache: move call to getFiles out of synchronized block - #3370
- Check for === instead of == - #3363
- Filter existing files in classpath - #3361
- Suppress RedundantVisibilityModifierRule if explicit API mode enabled - #3358
- Add the final new line in the baseline again - #3351
- [Security] Bump nokogiri from 1.10.10 to 1.11.1 in /docs - #3348
- Remove trailing newline after ending IndentingXMLStreamWriter - #3347
- [Security] Bump nokogiri from 1.10.10 to 1.11.0 in /docs - #3343
- Add UnnecessaryFilter rule - #3341
- Reorganize docs for the configuration file - #3337
- Add new rule SleepInsteadOfDelay - #3335
- Update Android Gradle Plugin to 4.1.1 - #3328
- Support relative output paths - #3319
- Fix
runLastOnRootbeing empty in KtLintMultiRule - #3318 - Ensure binary-compatibility with previous versrions - #3315
- Fix reports not propagated to detekt task with type resolution - #3313
- Support configurable severity per ruleset/rule in XML and Sarif output - #3310
- Configure default excludes for InvalidPackageDeclaration - #3305
- Remove exceptions of Library rules - #3304
- Move the questions to discussions - #3300
- Magic number extension functions - #3299
- NamedArguments: fix false positive with varargs - #3294
- NamedArguments rule: false positive with varargs - #3291
- NamedArguments with java code false positive - #3289
- Upgrade ktlint to 0.40.0 - #3281
- False positive "Unconditional loop jump" - #3280
- ForbiddenComments don't report TODO: in KDoc - #3273
- Add MultilineLambdaItParameter rule - #3259
- Update Kotlin to 1.4.21 - #3254
- Introduce --all-rules flag - #3253
- Enable more rules by default - #3229
- Running multiple Detekt tasks concurrently may cause deadlock - #3047
- detektMain is noisy "Ignoring a file detekt cannot handle" - #3019
- Configure default excludes for InvalidPackageDeclaration - #2539
- Hyperlink to error inside Android studio - #2340
- Align cli flags and defaults with other analysis tools - #2267
Housekeeping & Refactorings
- Bump mockk from 1.10.5 to 1.10.6 - #3473
- Upgrade to Gradle 6.8.2 - #3468
- Correct
maxIssuesdocumentation - #3456 - Bump junit-platform-launcher from 1.7.0 to 1.7.1 - #3454
- Don't use deprecated functions - #3452
- Bump github-pages from 210 to 211 in /docs - #3434
- Add documentation for SARIF, severity and relative path - #3433
- Refactor uploading SARIF to report without overriding the previous step - #3432
- Fix
githubReleaseskipping assets - #3427 - Prompt bug reporters to attach gradle scan - #3422
- Fix invalid link in detekt html report - #3421
- Prepare 1.16.0-rc1 release - #3411
- Add full qualified name in documentation - #3410
- Bump kotlinx-coroutines-core from 1.3.8 to 1.4.1 - #3407
- Fix deploy website on master - #3406
- Bump mockk from 1.10.4 to 1.10.5 - #3404
- Bump assertj-core from 3.18.1 to 3.19.0 - #3403
- Bump github-pages from 209 to 210 in /docs - #3401
- Update dangling URLs pointing to the old website - #3400
- Auto generate CLI options in docs - #3399
- Update documentations on snapshots - #3393
- Fix maven publish - #3392
- Fix build script to avoid jvm plugin applied - #3389
- Disable parallel test discovery; we already use Grade workers for max parallelism - #3387
- Use more fluent assertions - #3381
- Refactor orders of repositories - #3376
- Add a test for UndocumentedPublicClass and fun interfaces - #3374
- Refactor build.gradle.kts in detekt-gradle-plugin - #3371
- Gradle to 6.8 - #3362
- Integrate SARIF report with Github code scanning - #3359
- Refactor integration test for detekt-gradle-plugin - #3356
- Improve gradle plugin - #3354
- Remove checkNotNull - #3352
- Generate API validation for
detekt-psi-utils- #3338 - recover binary compatibility with 1.15.0 - #3336
- Refactor tests in detekt-gradle-plugin - #3333
- Fix failing website deployment on master - #3332
- The output of updateVersion should not depend on the OS that executes it - [#3330](#333...
v1.16.0-RC2
- 2021-02-19
Notable Changes
Migration
Changelog
- Add UnreachableCatchBlock rule - #3478
- Fix false negative "UselessCallOnNotNull" with
list.isNullOrEmpty()- #3475 - Add UseOrEmpty rule - #3470
- Add UseIsNullOrEmpty rule - #3469
- Fix false positives for MultilineLambdaItParameter.kt - #3451
- Dont generate baseline if empty - #3450
- Silence IndexOutOfBoundsException in getLineAndColumnInPsiFile() - #3446
- Add new ObjectExtendsThrowable rule - #3443
- Add allRules and deprecate failFast in gradle tasks - #3431
- Add two missing ktlint rules - #3430
- Don't fail if baseline doesn't exist in PlainDetekt - #3429
- Fix False Positive on
UnnecessarySafeCall- #3419 - Fix false positive for
UnusedPrivateMemberwith expect on objects - #3417 - Fix code samples for
UnnecessarySafeCall- #3416 - New rule: DontDowncastCollectionTypes - #3413
- Fix documentation in UnnecessarySafeCall - #3412
- Bump gradle from 4.1.1 to 4.1.2 - #3405
- Introduce --max-issues flag for cli - #2267 - #3391
- Ignore actual functions in FunctionOnlyReturningConstant (#3388) - #3390
- Fix hyperlink for elements of the type 'KtFile' - #3386
- Update gradle doc to show table of contents correctly - #3383
- Update cli doc to show table of contents correctly - #3382
- Fix EmptyConfig making all rules active in production - #3380
- Empty custom config enables rules disabled by default - #3379
- Add
setup-detektaction to README - #3373 - GlobalClassLoaderCache: move call to getFiles out of synchronized block - #3370
- Check for === instead of == - #3363
- Filter existing files in classpath - #3361
- Suppress RedundantVisibilityModifierRule if explicit API mode enabled - #3358
- Add the final new line in the baseline again - #3351
- [Security] Bump nokogiri from 1.10.10 to 1.11.1 in /docs - #3348
- Remove trailing newline after ending IndentingXMLStreamWriter - #3347
- [Security] Bump nokogiri from 1.10.10 to 1.11.0 in /docs - #3343
- Add UnnecessaryFilter rule - #3341
- Reorganize docs for the configuration file - #3337
- Add new rule SleepInsteadOfDelay - #3335
- Update Android Gradle Plugin to 4.1.1 - #3328
- Support relative output paths - #3319
- Fix
runLastOnRootbeing empty in KtLintMultiRule - #3318 - Ensure binary-compatibility with previous versrions - #3315
- Fix reports not propagated to detekt task with type resolution - #3313
- Support configurable severity per ruleset/rule in XML and Sarif output - #3310
- Configure default excludes for InvalidPackageDeclaration - #3305
- Remove exceptions of Library rules - #3304
- Move the questions to discussions - #3300
- Magic number extension functions - #3299
- NamedArguments: fix false positive with varargs - #3294
- NamedArguments rule: false positive with varargs - #3291
- NamedArguments with java code false positive - #3289
- Upgrade ktlint to 0.40.0 - #3281
- False positive "Unconditional loop jump" - #3280
- ForbiddenComments don't report TODO: in KDoc - #3273
- Add MultilineLambdaItParameter rule - #3259
- Update Kotlin to 1.4.21 - #3254
- Introduce --all-rules flag - #3253
- Enable more rules by default - #3229
- Running multiple Detekt tasks concurrently may cause deadlock - #3047
- detektMain is noisy "Ignoring a file detekt cannot handle" - #3019
- Configure default excludes for InvalidPackageDeclaration - #2539
- Hyperlink to error inside Android studio - #2340
- Align cli flags and defaults with other analysis tools - #2267
Housekeeping & Refactorings
- Bump mockk from 1.10.5 to 1.10.6 - #3473
- Upgrade to Gradle 6.8.2 - #3468
- Correct
maxIssuesdocumentation - #3456 - Bump junit-platform-launcher from 1.7.0 to 1.7.1 - #3454
- Don't use deprecated functions - #3452
- Bump github-pages from 210 to 211 in /docs - #3434
- Add documentation for SARIF, severity and relative path - #3433
- Refactor uploading SARIF to report without overriding the previous step - #3432
- Fix
githubReleaseskipping assets - #3427 - Prompt bug reporters to attach gradle scan - #3422
- Fix invalid link in detekt html report - #3421
- Prepare 1.16.0-rc1 release - #3411
- Add full qualified name in documentation - #3410
- Bump kotlinx-coroutines-core from 1.3.8 to 1.4.1 - #3407
- Fix deploy website on master - #3406
- Bump mockk from 1.10.4 to 1.10.5 - #3404
- Bump assertj-core from 3.18.1 to 3.19.0 - #3403
- Bump github-pages from 209 to 210 in /docs - #3401
- Update dangling URLs pointing to the old website - #3400
- Auto generate CLI options in docs - #3399
- Update documentations on snapshots - #3393
- Fix maven publish - #3392
- Fix build script to avoid jvm plugin applied - #3389
- Disable parallel test discovery; we already use Grade workers for max parallelism - #3387
- Use more fluent assertions - #3381
- Refactor orders of repositories - #3376
- Add a test for UndocumentedPublicClass and fun interfaces - #3374
- Refactor build.gradle.kts in detekt-gradle-plugin - #3371
- Gradle to 6.8 - #3362
- Integrate SARIF report with Github code scanning - #3359
- Refactor integration test for detekt-gradle-plugin - #3356
- Improve gradle plugin - #3354
- Remove checkNotNull - #3352
- Generate API validation for
detekt-psi-utils- #3338 - recover binary compatibility with 1.15.0 - #3336
- Refactor tests in detekt-gradle-plugin - #3333
- Fix failing website deployment on master - #3332
- The output of updateVersion should not depend on the OS that executes it - [#3330](#333...