detekt/detekt (io.gitlab.arturbosch.detekt)
### [`v1.23.7`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.7)
##### 1.23.7 - 2024-09-08
This is a point release for Detekt `1.23.0`, built against Kotlin `2.0.10`, with fixes for several bugs that got reported by the community.
##### Notable Changes
- fix(deps): update kotlin monorepo to v2.0.10 - [#7517](https://redirect.github.com/detekt/detekt/pull/7517)
- Update to Kotlin 2.0.0 [#6640](https://redirect.github.com/detekt/detekt/pull/6640)
- fix(deps): update kotlin monorepo to v1.9.24 - [#7264](https://redirect.github.com/detekt/detekt/pull/7264)
- fix(deps): update dependency com.android.tools.build:gradle to v8.5.2 - [#7525](https://redirect.github.com/detekt/detekt/pull/7525)
- chore(deps): update dependency gradle to v8.10 - [#7546](https://redirect.github.com/detekt/detekt/pull/7546)
##### Changelog
- Add basic support for isolated projects to 1.x - [#7526](https://redirect.github.com/detekt/detekt/pull/7526)
- ExplicitCollectionElementAccessMethod: fix false positive when Map put has 3 arguments - [#7563](https://redirect.github.com/detekt/detekt/pull/7563)
- BracesOnIfStatements: fix false-positive when chained - [#7444](https://redirect.github.com/detekt/detekt/pull/7444)
- Add enum entry check in `UndocumentedPublicProperty` - [#7426](https://redirect.github.com/detekt/detekt/pull/7426)
- Use the anchor which is already present before - [#7423](https://redirect.github.com/detekt/detekt/pull/7423)
- Fix small corner-case in "SerialVersionUIDInSerializableClass" rule, … - [#7346](https://redirect.github.com/detekt/detekt/pull/7346)
- SwallowedException: fix false positive when exception is used as a receiver - [#7288](https://redirect.github.com/detekt/detekt/pull/7288)
- NamedArguments: fix false positive on spread varargs - [#7283](https://redirect.github.com/detekt/detekt/pull/7283)
- MultilineLambdaItParameter: fix false negative with single statement on multiple lines - [#7221](https://redirect.github.com/detekt/detekt/pull/7221)
- Check for root of receiver in selector expression - [#7220](https://redirect.github.com/detekt/detekt/pull/7220)
- Check for `public companion` object for `UndocumentedPublicClass` - [#7219](https://redirect.github.com/detekt/detekt/pull/7219)
- fix: TopLevelPropertyNaming also detecting extension property name - [#7212](https://redirect.github.com/detekt/detekt/pull/7212)
- Publish detekt-compiler-plugin-all to Maven and GH Releases - [#7179](https://redirect.github.com/detekt/detekt/pull/7179)
- versioned default detekt config file link - [#7161](https://redirect.github.com/detekt/detekt/pull/7161)
- Support rangeUntil operator for UnusedImport rule - [#7104](https://redirect.github.com/detekt/detekt/pull/7104)
- Fix false positive on it usages when type parameter is specified - [#6850](https://redirect.github.com/detekt/detekt/pull/6850)
##### Housekeeping/Docs
- \[bugfix] AnnotationOnSeparateLine in snippets - [#6526](https://redirect.github.com/detekt/detekt/pull/6526)
- Add docs about using the Compiler Plugin with the Kotlin CLI compiler - [#7184](https://redirect.github.com/detekt/detekt/pull/7184)
### [`v1.23.6`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.6)
##### 1.23.6 - 2024-03-23
This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.23` and fixed several bugs that got reported by the community.
##### Changelog
- UselessPostfixExpression - Fix [#7037](https://redirect.github.com/detekt/detekt/issues/7037) false positive postfix - [#7084](https://redirect.github.com/detekt/detekt/pull/7084)
- Don't allow invalid Source Locations - [#7030](https://redirect.github.com/detekt/detekt/pull/7030)
- UnusedPrivateClass: don't report if private classes are used for type conversion - [#6995](https://redirect.github.com/detekt/detekt/pull/6995)
- RedundantSuspendModifier: do not report when the function has 'actual' modifier - [#6951](https://redirect.github.com/detekt/detekt/pull/6951)
- Update dependency gradle to v8.7 - [#7080](https://redirect.github.com/detekt/detekt/pull/7080)
- Update kotlin monorepo to v1.9.23 - [#7027](https://redirect.github.com/detekt/detekt/pull/7027)
- Update dependency gradle to v8.6 - [#6939](https://redirect.github.com/detekt/detekt/pull/6939)
- Update dependency com.android.tools.build:gradle to v8.3.1 - [#7070](https://redirect.github.com/detekt/detekt/pull/7070)
##### Contributors
We would like to thank the following contributors that made this release possible: [@BraisGabin](https://redirect.github.com/BraisGabin), [@psuzn](https://redirect.github.com/psuzn), [@t-kameyama](https://redirect.github.com/t-kameyama).
### [`v1.23.5`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.5)
This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.22` and fixed several bugs that
got reported by the community.
##### Notable Changes
- Test Gradle plugin with AGP 8.2.0 - [#6672](https://redirect.github.com/detekt/detekt/pull/6672)
- chore(deps): update dependency gradle to v8.5 - [#6663](https://redirect.github.com/detekt/detekt/pull/6663)
- fix(deps): update kotlin monorepo to v1.9.22 - [#6746](https://redirect.github.com/detekt/detekt/pull/6746)
##### Changelog
- Report rule's default severity in sarif backport - [#6916](https://redirect.github.com/detekt/detekt/pull/6916)
- Add ignoreAnnotatedFunctions to TooManyFunctions - [#6875](https://redirect.github.com/detekt/detekt/pull/6875)
- Fix by checking the existence of label in previous statements - [#6671](https://redirect.github.com/detekt/detekt/pull/6671)
- Also check `USELESS_ELVIS` in `UnreachableCode` - [#6624](https://redirect.github.com/detekt/detekt/pull/6624)
- Fix by adding last method call to the set - [#6567](https://redirect.github.com/detekt/detekt/pull/6567)
##### Housekeeping & Refactorings
- Opt in to ExperimentalCompilerApi in all compilations in compiler-plugin - [#6534](https://redirect.github.com/detekt/detekt/pull/6534)
##### Contributors
We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@TWiStErRob](https://redirect.github.com/TWiStErRob), [@atulgpt](https://redirect.github.com/atulgpt), [@matejdro](https://redirect.github.com/matejdro)
### [`v1.23.4`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.4)
##### 1.23.4 - 2023-11-26
This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.21` and fixed several bugs that
got reported by the community.
##### Notable Changes
- fix(deps): update kotlin monorepo to v1.9.21 - [#6642](https://redirect.github.com/detekt/detekt/pull/6642)
- fix(deps): update kotlin monorepo to v1.9.20 - [#6572](https://redirect.github.com/detekt/detekt/pull/6572)
##### Changelog
- Update the ruleset regex to allow numbers - [#6635](https://redirect.github.com/detekt/detekt/pull/6635)
- Show deprecation message - [#6614](https://redirect.github.com/detekt/detekt/pull/6614)
- Add io.gitlab.arturbosch.detekt.generator.Main to the jar manifest - [#6613](https://redirect.github.com/detekt/detekt/pull/6613)
- Don't report FunctionNaming when the function's name equals to the return type's name with type arguments - [#6605](https://redirect.github.com/detekt/detekt/pull/6605)
- Fix issues related to kotlin-stdlib's Gradle module metadata in Kotlin 1.9.20 - [#6590](https://redirect.github.com/detekt/detekt/pull/6590)
- MethodSignature - Add the condition of receiver should be null - [#6570](https://redirect.github.com/detekt/detekt/pull/6570)
- Remove check for deprectated functions toUpperCase and toLowerCase - [#6548](https://redirect.github.com/detekt/detekt/pull/6548)
- Fixes false positive of trailing whitespaces in kdoc - [#6370](https://redirect.github.com/detekt/detekt/pull/6370)
##### Dependency Updates
- Update tested AGP version to 8.1.3 - [#6610](https://redirect.github.com/detekt/detekt/pull/6610)
- Switch to kctfork for Kotlin compilation testing - [#6589](https://redirect.github.com/detekt/detekt/pull/6589)
##### Contributors
We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@BraisGabin](https://redirect.github.com/BraisGabin), [@Gosunet](https://redirect.github.com/Gosunet), [@atulgpt](https://redirect.github.com/atulgpt), [@t-kameyama](https://redirect.github.com/t-kameyama)
### [`v1.23.3`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.3)
##### 1.23.3 - 2023-10-31
This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.10` and fixed several bugs that
got reported by the community.
NOTE: This is a republishing of 1.23.2 which was accidentally published against Kotlin 1.9.0 instead of 1.9.10
##### Changelog
- Consider deprecated rules as inactive when running allRules [#6381](https://redirect.github.com/detekt/detekt/pull/6381)
- Fix inputstream leaking file descriptor in Gradle - [#6519](https://redirect.github.com/detekt/detekt/pull/6519)
- ForbiddenMethodCall - Handle sequence of overridden methods - [#6478](https://redirect.github.com/detekt/detekt/pull/6478)
- Function to return supported Kotlin version - [#6472](https://redirect.github.com/detekt/detekt/pull/6472)
- Fix false negative `IgnoredReturnValue` with scope functions - [#6446](https://redirect.github.com/detekt/detekt/pull/6446)
- UnconditionalJumpStatementInLoop: don't report a conditional break in a single body expression - [#6443](https://redirect.github.com/detekt/detekt/pull/6443)
- Fix reporting unused imports at file level - [#6390](https://redirect.github.com/detekt/detekt/pull/6390)
- OutdatedDocumentation - Detect param which private property documented as property - [#6372](https://redirect.github.com/detekt/detekt/pull/6372)
- NullableToStringCall: fix false negative in lambda - [#6352](https://redirect.github.com/detekt/detekt/pull/6352)
- Correctly set scheme for URIs in the SARIF report output - [#6331](https://redirect.github.com/detekt/detekt/pull/6331)
- SleepInsteadOfDelay - Find the parent for suspend check - [#6191](https://redirect.github.com/detekt/detekt/pull/6191)
##### Dependency Updates
- Update kotlin monorepo to v1.9.10 - [#6423](https://redirect.github.com/detekt/detekt/pull/6423)
- Update dependency gradle to v8.4 - [#6522](https://redirect.github.com/detekt/detekt/pull/6522)
- Update dependency gradle to v8.3 - [#6406](https://redirect.github.com/detekt/detekt/pull/6406)
- Update com.android.tools.build to 8.1.1 - [#6419](https://redirect.github.com/detekt/detekt/pull/6419)
- update dependency org.jetbrains.dokka to v1.9.10 - [#6549](https://redirect.github.com/detekt/detekt/pull/6549)
##### Contributors
We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@arturbosch](https://redirect.github.com/arturbosch), [@atulgpt](https://redirect.github.com/atulgpt), [@kkocel](https://redirect.github.com/kkocel), [@marschwar](https://redirect.github.com/marschwar), [@pablobaxter](https://redirect.github.com/pablobaxter), [@t-kameyama](https://redirect.github.com/t-kameyama)
### [`v1.23.2`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.2)
##### 1.23.2 - 2023-10-29
**NOTE: Please use version 1.23.3 instead - Version 1.23.2 was accidentally built against Kotlin 1.9.0 instead of 1.9.10**
https://github.com/detekt/detekt/releases/tag/v1.23.3
This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.10` and fixed several bugs that
got reported by the community.
##### Changelog
- Consider deprecated rules as inactive when running allRules [#6381](https://redirect.github.com/detekt/detekt/pull/6381)
- Fix inputstream leaking file descriptor in Gradle - [#6519](https://redirect.github.com/detekt/detekt/pull/6519)
- ForbiddenMethodCall - Handle sequence of overridden methods - [#6478](https://redirect.github.com/detekt/detekt/pull/6478)
- Function to return supported Kotlin version - [#6472](https://redirect.github.com/detekt/detekt/pull/6472)
- Fix false negative `IgnoredReturnValue` with scope functions - [#6446](https://redirect.github.com/detekt/detekt/pull/6446)
- UnconditionalJumpStatementInLoop: don't report a conditional break in a single body expression - [#6443](https://redirect.github.com/detekt/detekt/pull/6443)
- Fix reporting unused imports at file level - [#6390](https://redirect.github.com/detekt/detekt/pull/6390)
- OutdatedDocumentation - Detect param which private property documented as property - [#6372](https://redirect.github.com/detekt/detekt/pull/6372)
- NullableToStringCall: fix false negative in lambda - [#6352](https://redirect.github.com/detekt/detekt/pull/6352)
- Correctly set scheme for URIs in the SARIF report output - [#6331](https://redirect.github.com/detekt/detekt/pull/6331)
- SleepInsteadOfDelay - Find the parent for suspend check - [#6191](https://redirect.github.com/detekt/detekt/pull/6191)
##### Dependency Updates
- Update kotlin monorepo to v1.9.10 - [#6423](https://redirect.github.com/detekt/detekt/pull/6423)
- Update dependency gradle to v8.4 - [#6522](https://redirect.github.com/detekt/detekt/pull/6522)
- Update dependency gradle to v8.3 - [#6406](https://redirect.github.com/detekt/detekt/pull/6406)
- Update com.android.tools.build to 8.1.1 - [#6419](https://redirect.github.com/detekt/detekt/pull/6419)
- update dependency org.jetbrains.dokka to v1.9.10 - [#6549](https://redirect.github.com/detekt/detekt/pull/6549)
##### Contributors
We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@arturbosch](https://redirect.github.com/arturbosch), [@atulgpt](https://redirect.github.com/atulgpt), [@kkocel](https://redirect.github.com/kkocel), [@marschwar](https://redirect.github.com/marschwar), [@pablobaxter](https://redirect.github.com/pablobaxter), [@t-kameyama](https://redirect.github.com/t-kameyama)
### [`v1.23.1`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.1)
##### 1.23.1 - 2023-07-30
This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.0` and fixed several bugs that
got reported by the community.
##### Notable Changes
- Bumped Kotlin to v1.9.0 - [#6258](https://redirect.github.com/detekt/detekt/pull/6258)
- Bumped KtLint to v0.50.0 - [#6239](https://redirect.github.com/detekt/detekt/pull/6239)
- Updated CLI to reflect Java 20 support - [#6277](https://redirect.github.com/detekt/detekt/pull/6277)
##### Changelog
- Add missing jdkHome and languageVersion properties to DetektCreateBaselineTask - [#6284](https://redirect.github.com/detekt/detekt/pull/6284)
- Make InvalidRange aware of rangeUntil operator - [#6264](https://redirect.github.com/detekt/detekt/pull/6264)
- MaxChainedCallsOnSameLine: don't count class references as chained calls - [#6224](https://redirect.github.com/detekt/detekt/pull/6224)
- CanBeNonNullable: Fix false positive when property is defined after assignment - [#6210](https://redirect.github.com/detekt/detekt/pull/6210)
- Add `..<` and `rangeTo` in the `ForEachOnRange` rule - [#6197](https://redirect.github.com/detekt/detekt/pull/6197)
- Don't report `UseDataClass` if class contains non-property parameters - [#6173](https://redirect.github.com/detekt/detekt/pull/6173)
- Allow documenting public fun name when same private variable is present - [#6165](https://redirect.github.com/detekt/detekt/pull/6165)
- Find range call using recursion - [#6164](https://redirect.github.com/detekt/detekt/pull/6164)
- StringShouldBeRawString: Ignore `replaceIndent` and `prependIndent` - [#6154](https://redirect.github.com/detekt/detekt/pull/6154)
- UnusedPrivateProperty: Fix false postive by ignoring data classes - [#6151](https://redirect.github.com/detekt/detekt/pull/6151)
- PropertyUsedBeforeDeclaration: fix false positive in nested/inner class - [#6139](https://redirect.github.com/detekt/detekt/pull/6139)
##### Dependency Updates
- Update dependency gradle to v8.2.1 - [#6274](https://redirect.github.com/detekt/detekt/pull/6274)
- Switch to SLF4J 2.x - [#6266](https://redirect.github.com/detekt/detekt/pull/6266)
- Update kotlin monorepo to v1.8.22 - [#6192](https://redirect.github.com/detekt/detekt/pull/6192)
##### Contributors
We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@Goooler](https://redirect.github.com/Goooler), [@Hexcles](https://redirect.github.com/Hexcles), [@PoisonedYouth](https://redirect.github.com/PoisonedYouth), [@TWiStErRob](https://redirect.github.com/TWiStErRob), [@VirtualParticle](https://redirect.github.com/VirtualParticle), [@atulgpt](https://redirect.github.com/atulgpt), [@cortinico](https://redirect.github.com/cortinico), [@dzirbel](https://redirect.github.com/dzirbel), [@eygraber](https://redirect.github.com/eygraber), [@marschwar](https://redirect.github.com/marschwar), [@rmarquis](https://redirect.github.com/rmarquis), [@segunfamisa](https://redirect.github.com/segunfamisa), [@severn-everett](https://redirect.github.com/severn-everett), [@t-kameyama](https://redirect.github.com/t-kameyama)
[See all commit history here](https://redirect.github.com/detekt/detekt/compare/v1.23.0...v1.23.1)
### [`v1.23.0`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.0)
We're so proud to announce the next upcoming stable release of detekt: 1.23.0 🚀
This release is coming with 25 new rules and much more.
We moved the detekt-compiler-plugin to the main repo, and you can now use it in your builds [following the official documentation](https://detekt.dev/docs/gettingstarted/compilerplugin).
This release also marks the beginning of development of 2.x from the main branch! [You can follow the progress here](https://redirect.github.com/detekt/detekt/discussions/6035)
We want to take the opportunity to thank [our Sponsors](https://redirect.github.com/sponsors/detekt) and our Contributors for testing, bug reporting and helping us release this new version of Detekt. You're more than welcome to join our community on the [#detekt](https://kotlinlang.slack.com/archives/C88E12QH4) channel on KotlinLang's Slack (you can [get an invite here](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up)).
##### Notable Changes
- This is the first version of Detekt that ships with the `detekt-compiler-plugin`. The [Detekt Compiler plugin](https://detekt.dev/docs/gettingstarted/compilerplugin) is still experimental, but we're moving it closer to Detekt to make it easier to integrate. From now on the compiler plugin will follow the same versioning schema as Detekt. We invite you to try it and provide feedback till we stabilize it. You can read more about it in the [official documentation page](https://detekt.dev/docs/gettingstarted/compilerplugin) - [#5492](https://redirect.github.com/detekt/detekt/pull/5492)
- We added **25** new Rules to detekt
- `BracesOnIfStatements` - [#5700](https://redirect.github.com/detekt/detekt/pull/5700)
- `BracesOnWhenStatements` - [#5838](https://redirect.github.com/detekt/detekt/pull/5838)
- `CastNullableToNonNullableType` - [#5653](https://redirect.github.com/detekt/detekt/pull/5653)
- `DoubleNegativeLambda` - [#5937](https://redirect.github.com/detekt/detekt/pull/5937)
- `ForbiddenAnnotation` - [#5515](https://redirect.github.com/detekt/detekt/pull/5515)
- `PropertyUsedBeforeDeclaration` - [#6062](https://redirect.github.com/detekt/detekt/pull/6062)
- `StringShouldBeRawString` - [#5705](https://redirect.github.com/detekt/detekt/pull/5705)
- `SuspendFunSwallowedCancellation` - [#5666](https://redirect.github.com/detekt/detekt/pull/5666)
- `UnusedParameter` - [#5722](https://redirect.github.com/detekt/detekt/pull/5722)
- `UnusedPrivateProperty` - [#5722](https://redirect.github.com/detekt/detekt/pull/5722)
- `UseLet` - [#6091](https://redirect.github.com/detekt/detekt/pull/6091)
- `UnnecessaryBracesAroundTrailingLambda` - [#6029](https://redirect.github.com/detekt/detekt/pull/6029)
- Plus the bump to KtLint 0.49.1 added the following rules to the `detekt-formatting` ruleset:
- `ClassName` - [#6037](https://redirect.github.com/detekt/detekt/pull/6037)
- `EnumWrapping` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028)
- `FunctionName` - [#6037](https://redirect.github.com/detekt/detekt/pull/6037)
- `IfElseBracing` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028)
- `IfElseWrapping` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028)
- `MultilineExpressionWrapping` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028)
- `NoBlankLineInList` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028)
- `NoConsecutiveComments` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028)
- `NoEmptyFirstLineInClassBody` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028)
- `NoSingleLineBlockCommentRule` - [#6104](https://redirect.github.com/detekt/detekt/pull/6104)
- `ParameterWrapping` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028)
- `PropertyName` - [#6037](https://redirect.github.com/detekt/detekt/pull/6037)
- `PropertyWrapping` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028)
- `StringTemplateIndent` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028)
- `TryCatchFinallySpacing` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028)
- Notable changes to existing rules:
- `UnnecessaryAbstractClass` now only runs with type resolution - [#5829](https://redirect.github.com/detekt/detekt/pull/5829)
- `UnusedPrivateMember` has been refactored with some of its logic moved to `UnusedParameter` and `UnusedPrivateProperty` - [#5722](https://redirect.github.com/detekt/detekt/pull/5722)
- Removed the `ignoreOverridden` config from `BooleanPropertyNaming`, `ConstructorParameterNaming`, `FunctionNaming`, `VariableNaming` and `FunctionParameterNaming` as not useful for those rules - [#5718](https://redirect.github.com/detekt/detekt/pull/5718)
- Added `ignoredSubjectTypes` to rule `ElseCaseInsteadOfExhaustiveWhen` to specify types that should be ignored by the rule ([#5623](https://redirect.github.com/detekt/detekt/issues/5623)) - [#5634](https://redirect.github.com/detekt/detekt/pull/5634)
- Added `allowOperators` to rule `DataClassContainsFunctions` - [#5658](https://redirect.github.com/detekt/detekt/pull/5658)
- `MandatoryBracesIfStatements` has been removed in favor of `BracesOnIfStatements` - [#5700](https://redirect.github.com/detekt/detekt/pull/5700)
- Added `ignoreWhenContainingVariableDeclaration` to `UseIfInsteadOfWhen` to ignore captured variables - [#5681](https://redirect.github.com/detekt/detekt/pull/5681)
- Several rules in the `detekt-formatting` ruleset now accepts an `indentSize` parameter (see the [full list here](https://redirect.github.com/detekt/detekt/pull/6028/files#diff-2486d56e6f1bbfcb160b923d15266691f5776948cf5bb31c8fc102bd3cf9513d)).
- We followed the KtLint decisions on turning on some rules by default, so several rules in the `detekt-formatting` ruleset are now turned on by default (see the [full list here](https://redirect.github.com/detekt/detekt/pull/6028/files#diff-2486d56e6f1bbfcb160b923d15266691f5776948cf5bb31c8fc102bd3cf9513d)).
- We added support for Gradle's Worker API inside Detekt Gradle Plugin, for faster execution on bigger projects. - [#4128](https://redirect.github.com/detekt/detekt/pull/4128)
- We fixed the `includes`/`excludes` logic on the config file as they were overriding each other - [#5782](https://redirect.github.com/detekt/detekt/pull/5782)
- We fully removed support for Spek from `detekt-test-utils`. The recommended testing framework is JUnit - [#5785](https://redirect.github.com/detekt/detekt/pull/5785)
- The minimum supported Gradle version is now `v6.8.3` - [#5616](https://redirect.github.com/detekt/detekt/pull/5616)
- This version of detekt is built with Gradle `v8.1`, AGP `8.0.1`, Kotlin `1.8.21` and KtLint `0.49.1` (see [#5893](https://redirect.github.com/detekt/detekt/pull/5893) [#5723](https://redirect.github.com/detekt/detekt/pull/5723) [#5877](https://redirect.github.com/detekt/detekt/pull/5877) [#6028](https://redirect.github.com/detekt/detekt/pull/6028) [#6043](https://redirect.github.com/detekt/detekt/pull/6043) [#5995](https://redirect.github.com/detekt/detekt/pull/5995) [#5996](https://redirect.github.com/detekt/detekt/pull/5996))
- We now added a [Code of Conduct](https://redirect.github.com/detekt/detekt/blob/main/.github/CODE_OF_CONDUCT.md) to our repo. Please read it and follow it when interacting with our community on our channels.
##### Changelog
- SerialVersionUIDInSerializableClass - Update the error location - [#6114](https://redirect.github.com/detekt/detekt/pull/6114)
- Reduce LoopWithTooManyJumpStatements finding scope - [#6110](https://redirect.github.com/detekt/detekt/pull/6110)
- Add alias for SuspendFunWithCoroutineScopeReceiver - [#6089](https://redirect.github.com/detekt/detekt/pull/6089)
- CastNullableToNonNullableType - Check the SimpleType instead of typeElement - [#6071](https://redirect.github.com/detekt/detekt/pull/6071)
- Update plugin com.gradle.enterprise to v3.13.1 - [#6069](https://redirect.github.com/detekt/detekt/pull/6069)
- CanBeNonNullable: Check parent condition for checking if nullability info is used or not - [#6064](https://redirect.github.com/detekt/detekt/pull/6064)
- Add configuration to add alternate trimming methods - [#6063](https://redirect.github.com/detekt/detekt/pull/6063)
- Check if property is documented at class header - [#6061](https://redirect.github.com/detekt/detekt/pull/6061)
- OutdatedDocumentation - Check if only public property is documented - [#6057](https://redirect.github.com/detekt/detekt/pull/6057)
- UnnecessaryLet: fix false positive in call chains - [#6052](https://redirect.github.com/detekt/detekt/pull/6052)
- Add `comments` with a list of regexes to `ForbiddenComment` - [#5981](https://redirect.github.com/detekt/detekt/pull/5981)
- Fix incomplete `requireRootInDeclaration` check in `InvalidPackageDeclaration` - [#6045](https://redirect.github.com/detekt/detekt/pull/6045)
- BracesOnWhenStatements: fix false positive for necessary braces - [#6042](https://redirect.github.com/detekt/detekt/pull/6042)
- Fix redundant ClassOrdering violations using maximum increasing section - [#6003](https://redirect.github.com/detekt/detekt/pull/6003)
- UseIsNullOrEmpty: fix false negative with chained call - [#6027](https://redirect.github.com/detekt/detekt/pull/6027)
- Create docs for Gradle Worker API - [#6016](https://redirect.github.com/detekt/detekt/pull/6016)
- Compile compiler plugin against kotlin-compiler-embeddable - [#6012](https://redirect.github.com/detekt/detekt/pull/6012)
- Update intro.mdx to use setFrom() on detekt config - [#6010](https://redirect.github.com/detekt/detekt/pull/6010)
- Use `detekt-versions.properties` instead of `versions.properties` - [#6006](https://redirect.github.com/detekt/detekt/pull/6006)
- Implement parentPath accessor in concrete config implementations - [#6002](https://redirect.github.com/detekt/detekt/pull/6002)
- Increase ALIASES_LIMIT to 100 for YamlConfig - [#5986](https://redirect.github.com/detekt/detekt/pull/5986)
- Fix elvis to +/- case in case UnnecessaryParentheses when precedence is unclear - [#5983](https://redirect.github.com/detekt/detekt/pull/5983)
- jdkHome as [@Internal](https://redirect.github.com/Internal) - [#5978](https://redirect.github.com/detekt/detekt/pull/5978)
- Fix broken POM file for detetk-compiler-plugin - [#5971](https://redirect.github.com/detekt/detekt/pull/5971)
- Fix broken publishToMavenLocal - [#5970](https://redirect.github.com/detekt/detekt/pull/5970)
- Add `allowOmitUnit` to rule `LibraryCodeMustSpecifyReturnType` - [#5861](https://redirect.github.com/detekt/detekt/pull/5861)
- Remove dependency that creates a cycle. - [#5777](https://redirect.github.com/detekt/detekt/pull/5777)
- Update dependency org.jetbrains:annotations to v24 - [#5969](https://redirect.github.com/detekt/detekt/pull/5969)
- Update github/codeql-action digest to [`8c8d71d`](https://redirect.github.com/detekt/detekt/commit/8c8d71d) - [#5966](https://redirect.github.com/detekt/detekt/pull/5966)
- Add functions to ExitOutsideMain rule - [#5963](https://redirect.github.com/detekt/detekt/pull/5963)
- Update README.md - [#5954](https://redirect.github.com/detekt/detekt/pull/5954)
- Prevent import statements from counting as references for UnusedPrivateProperty - [#5942](https://redirect.github.com/detekt/detekt/pull/5942)
- Fix ExpressionBodySyntax not checking property getters/setters - [#5938](https://redirect.github.com/detekt/detekt/pull/5938)
- Improve correctness of UnusedPrivateProperty - [#5935](https://redirect.github.com/detekt/detekt/pull/5935)
- Fix documentation for deprecated 'reports' object (Issue [#5908](https://redirect.github.com/detekt/detekt/issues/5908)) - [#5924](https://redirect.github.com/detekt/detekt/pull/5924)
- Print file path report as link file - [#5921](https://redirect.github.com/detekt/detekt/pull/5921)
- "detekt" or "Detekt" - [#5898](https://redirect.github.com/detekt/detekt/issues/5898)
- Update JSON schema URL - [#5881](https://redirect.github.com/detekt/detekt/pull/5881)
- Add support for local suppression inside formatting - [#5876](https://redirect.github.com/detekt/detekt/pull/5876)
- Fix checkExhaustiveness for formatting and third party rules - [#5869](https://redirect.github.com/detekt/detekt/pull/5869)
- Allow newline style for MaxChainedCallsOnSameLine - [#5865](https://redirect.github.com/detekt/detekt/pull/5865)
- Declare inputs and outputs to support incremental build for testPluginKotlinc - [#5862](https://redirect.github.com/detekt/detekt/pull/5862)
- Use code syntax for `Unit` for ImplicitUnitReturnType rule - [#5857](https://redirect.github.com/detekt/detekt/pull/5857)
- MatchingDeclarationName. KtFilesSpec also remove .common.kt suffix from kotlin files - [#5851](https://redirect.github.com/detekt/detekt/pull/5851)
- Fix double mutability issues with Gradle plugin's use of ConfigurableFileCollection - [#5850](https://redirect.github.com/detekt/detekt/pull/5850)
- MagicNumber - Make ignoreNamedArgument catch more complex expression - [#5837](https://redirect.github.com/detekt/detekt/pull/5837)
- Exclude super call when generating guard clauses - [#5835](https://redirect.github.com/detekt/detekt/pull/5835)
- Enable test retry for all our modules - [#5825](https://redirect.github.com/detekt/detekt/pull/5825)
- Stop configuring report merge tasks while configuring Detekt tasks - [#5813](https://redirect.github.com/detekt/detekt/pull/5813)
- FunctionMatcher support for fully qualified function names - [#5812](https://redirect.github.com/detekt/detekt/pull/5812)
- Boy Scout - [#5808](https://redirect.github.com/detekt/detekt/pull/5808)
- Simplify `TestConfig` usages - [#5801](https://redirect.github.com/detekt/detekt/pull/5801)
- Reduce configuration of UnusedPrivateMember's split rules - [#5800](https://redirect.github.com/detekt/detekt/pull/5800)
- Force SerialVerionUID to be private - [#5798](https://redirect.github.com/detekt/detekt/pull/5798)
- Exclude the KMP test folders for android - [#5797](https://redirect.github.com/detekt/detekt/pull/5797)
- Add aliases for PackageNaming and InvalidPackageDeclaration - [#5795](https://redirect.github.com/detekt/detekt/pull/5795)
- Forbid using Jupiter Kotlin assertions - [#5794](https://redirect.github.com/detekt/detekt/pull/5794)
- ModifierOrder: fix false positive with block comments - [#5791](https://redirect.github.com/detekt/detekt/pull/5791)
- Fixed ProtectedMemberInFinalClass rule reporting valid JVM finalize - [#5788](https://redirect.github.com/detekt/detekt/pull/5788)
- Remove unnecessary usage of BeforeAll in tests - [#5781](https://redirect.github.com/detekt/detekt/pull/5781)
- Run Kotlin compiler plugin CLI test as part of standard build - [#5766](https://redirect.github.com/detekt/detekt/pull/5766)
- Refactor to remove java.util.Array\* imports - [#5761](https://redirect.github.com/detekt/detekt/pull/5761)
- Replace java.util.Stack with Kotlin's ArrayDeque implementation - [#5760](https://redirect.github.com/detekt/detekt/pull/5760)
- Replace java.time.Duration with kotlin.time.Duration - [#5759](https://redirect.github.com/detekt/detekt/pull/5759)
- Add NixOS installation method to doc - [#5757](https://redirect.github.com/detekt/detekt/pull/5757)
- Remove & forbid usage of java.util.stream - [#5756](https://redirect.github.com/detekt/detekt/pull/5756)
- Use stdlib functions for file & path operations - [#5754](https://redirect.github.com/detekt/detekt/pull/5754)
- Enable UnnecessaryBackticks in detekt project - [#5753](https://redirect.github.com/detekt/detekt/pull/5753)
- Update docusaurus monorepo to v2.3.1 - [#5752](https://redirect.github.com/detekt/detekt/pull/5752)
- Resolve runtime classpaths consistently with compile classpaths - [#5730](https://redirect.github.com/detekt/detekt/pull/5730)
- Exclude new Kotlin Test directories in default config - [#5727](https://redirect.github.com/detekt/detekt/issues/5727)
- Fail when unexpected version of kotlin-compiler-embeddable is on runtime classpath - [#5726](https://redirect.github.com/detekt/detekt/pull/5726)
- Fix IgnoredReturnValue rule crash in parallel mode - [#5724](https://redirect.github.com/detekt/detekt/pull/5724)
- Use `name` that return name after backticks - [#5719](https://redirect.github.com/detekt/detekt/pull/5719)
- UnusedPrivateMember - Fix false positive in case of invoke operator - [#5717](https://redirect.github.com/detekt/detekt/pull/5717)
- Fix false positive for `CanBeNonNullable` rule - [#5714](https://redirect.github.com/detekt/detekt/pull/5714)
- IgnoredReturnValue: fix false negative when annotation is on the package - [#5706](https://redirect.github.com/detekt/detekt/pull/5706)
- Check Thread.sleep for block expression - [#5699](https://redirect.github.com/detekt/detekt/pull/5699)
- Fix false positive of in UnnecessaryParentheses - [#5684](https://redirect.github.com/detekt/detekt/pull/5684)
- Fix url and kotlin reference support in kdoc - [#5683](https://redirect.github.com/detekt/detekt/pull/5683)
- Add config for variable expression in when - [#5681](https://redirect.github.com/detekt/detekt/pull/5681)
- Enable NoSemicolons rule - [#5663](https://redirect.github.com/detekt/detekt/pull/5663)
- Use correct resolvable/consumable flags on detekt's configurations - [#5657](https://redirect.github.com/detekt/detekt/pull/5657)
- Prepare for Gradle 8 - [#5656](https://redirect.github.com/detekt/detekt/pull/5656)
- ExplicitCollectionElementAccessMethod rule update - [#5654](https://redirect.github.com/detekt/detekt/pull/5654)
- Cast nullable to non nullable type - [#5653](https://redirect.github.com/detekt/detekt/pull/5653)
- Enable verbose mode for Codecov GH Action - [#5652](https://redirect.github.com/detekt/detekt/pull/5652)
- Fail build when issues found with JVM target compatibility of related compile tasks - [#5651](https://redirect.github.com/detekt/detekt/pull/5651)
- Don't silently use Kotlin compiler fallback strategy - [#5650](https://redirect.github.com/detekt/detekt/pull/5650)
- Documentation tweaks - [#5639](https://redirect.github.com/detekt/detekt/pull/5639)
- Have consistent compile-test-snippets between project and system property - [#5630](https://redirect.github.com/detekt/detekt/pull/5630)
- Exclude operator functions in function min/max length - [#5618](https://redirect.github.com/detekt/detekt/pull/5618)
- Broken link at EmptyFunctionBlock - [#5604](https://redirect.github.com/detekt/detekt/pull/5604)
- Update rule description for errorprone rules - [#5603](https://redirect.github.com/detekt/detekt/pull/5603)
- FunctionMaxLength false positive for overridden methods [#5590](https://redirect.github.com/detekt/detekt/issues/5590) - [#5599](https://redirect.github.com/detekt/detekt/pull/5599)
- Report proper code position in `MaxLineLength` - [#5583](https://redirect.github.com/detekt/detekt/pull/5583)
- Allow access to nonpublic members of public types in java.base/java.lang package - [#5579](https://redirect.github.com/detekt/detekt/pull/5579)
- NonBooleanPropertyPrefixedWithIs: Allow AtomicBoolean - [#5577](https://redirect.github.com/detekt/detekt/pull/5577)
- Pass compilation output classes to detekt analysis classpath - [#5556](https://redirect.github.com/detekt/detekt/pull/5556)
- Fix KDocReferencesNonPublicProperty false positive - [#5534](https://redirect.github.com/detekt/detekt/pull/5534)
##### Dependency Updates
- Update dependency io.github.detekt.sarif4k:sarif4k to v0.4.0 - [#6113](https://redirect.github.com/detekt/detekt/pull/6113)
- Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.7.1 - [#6097](https://redirect.github.com/detekt/detekt/pull/6097)
- Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.7.0 - [#6074](https://redirect.github.com/detekt/detekt/pull/6074)
- Update com.android.tools.build - [#6065](https://redirect.github.com/detekt/detekt/pull/6065)
- Update JaCoCo to v0.8.10 - [#6044](https://redirect.github.com/detekt/detekt/pull/6044)
- Update plugin pluginPublishing to v1.2.0 - [#5975](https://redirect.github.com/detekt/detekt/pull/5975)
- Update ktlint to v0.48.1 - [#5661](https://redirect.github.com/detekt/detekt/pull/5661)
- Update dependency com.android.tools.build:gradle to v7.4.0 - [#5693](https://redirect.github.com/detekt/detekt/pull/5693)
- JaCoCo 0.8.9 - [#5959](https://redirect.github.com/detekt/detekt/pull/5959)
- Update dependency com.github.tschuchortdev:kotlin-compile-testing to v1.5.0 - [#5882](https://redirect.github.com/detekt/detekt/pull/5882)
- Update dependency org.jetbrains.dokka to v1.8.10 - [#5878](https://redirect.github.com/detekt/detekt/pull/5878)
- Compile detekt-compiler-plugin against standard Kotlin compiler artifact - [#5765](https://redirect.github.com/detekt/detekt/pull/5765)
- Migrate to SnakeYAML Engine - [#5751](https://redirect.github.com/detekt/detekt/pull/5751)
- Update kotlin monorepo to v1.8.10 - [#5745](https://redirect.github.com/detekt/detekt/pull/5745)
- Update ktlint to v0.48.0 - [#5625](https://redirect.github.com/detekt/detekt/pull/5625)
- Migrate to Gradle Nexus Publish Plugin - [#5554](https://redirect.github.com/detekt/detekt/pull/5554)
- Update dependency io.github.detekt.sarif4k:sarif4k to v0.2.0 - [#5496](https://redirect.github.com/detekt/detekt/pull/5496)
##### Housekeeping & Refactorings
- Inline Cases enum and inline other external test code into the test classes - [#6107](https://redirect.github.com/detekt/detekt/pull/6107)
- Update codecov/codecov-action digest to [`eaaf4be`](https://redirect.github.com/detekt/detekt/commit/eaaf4be) - [#6102](https://redirect.github.com/detekt/detekt/pull/6102)
- Remove unnecessary baselines - [#6092](https://redirect.github.com/detekt/detekt/pull/6092)
- Remove unused `dependenciesAsNames` - [#6059](https://redirect.github.com/detekt/detekt/pull/6059)
- Reduce eager POM task creation - [#6041](https://redirect.github.com/detekt/detekt/pull/6041)
- Improve our configuration of `ClassNaming` and `FunctionNaming` - [#6019](https://redirect.github.com/detekt/detekt/pull/6019)
- Comment text in the Issue/PR Template - [#5992](https://redirect.github.com/detekt/detekt/pull/5992)
- Fix typo: Github -> GitHub - [#5956](https://redirect.github.com/detekt/detekt/pull/5956)
- Review all Detekt and Detekt Gradle Plugin usages. - [#5955](https://redirect.github.com/detekt/detekt/pull/5955)
- Review all Detekt and Detekt Gradle Plugin usages. - [#5953](https://redirect.github.com/detekt/detekt/pull/5953)
- Add a test for catching undocumented public interfaces - [#5951](https://redirect.github.com/detekt/detekt/pull/5951)
- Execute tests in parallel - [#5944](https://redirect.github.com/detekt/detekt/pull/5944)
- Make GeneratorSpec use resources - [#5932](https://redirect.github.com/detekt/detekt/pull/5932)
- Cleanup detekt-formatting to use detekt's own assertThat function - [#5911](https://redirect.github.com/detekt/detekt/pull/5911)
- Stale any issue with support tag in one month - [#5904](https://redirect.github.com/detekt/detekt/pull/5904)
- Remove instances of double mutability - [#5899](https://redirect.github.com/detekt/detekt/pull/5899)
- Handle todo in LinesOfCode logic - [#5897](https://redirect.github.com/detekt/detekt/pull/5897)
- Boy scout - `detekt-generator` - [#5854](https://redirect.github.com/detekt/detekt/pull/5854)
- Tweak GHA configs a bit - [#5852](https://redirect.github.com/detekt/detekt/pull/5852)
- Create `generateWebsite` - [#5849](https://redirect.github.com/detekt/detekt/pull/5849)
- Remove dependency between check and jacocoMergedReport - [#5846](https://redirect.github.com/detekt/detekt/pull/5846)
- Sort deprecation properties - [#5845](https://redirect.github.com/detekt/detekt/pull/5845)
- Simplify generate documentation - [#5844](https://redirect.github.com/detekt/detekt/pull/5844)
- Remove unnecessary `@Suppress("ReturnCount")` - [#5841](https://redirect.github.com/detekt/detekt/pull/5841)
- Cleaner merging of Gradle blocks for functionalTests - [#5830](https://redirect.github.com/detekt/detekt/pull/5830)
- Replace trimMargin usages - [#5827](https://redirect.github.com/detekt/detekt/pull/5827)
- Disable PTS from local and enable it for PRs - [#5826](https://redirect.github.com/detekt/detekt/pull/5826)
- Activate MultilineRawStringIndentation on detekt - [#5819](https://redirect.github.com/detekt/detekt/pull/5819)
- Remove single-use `times` method, use stdlib's `repeat` instead. - [#5774](https://redirect.github.com/detekt/detekt/pull/5774)
- Remove redundant build config - [#5617](https://redirect.github.com/detekt/detekt/pull/5617)
- Migrate to AGP namespaces - [#5569](https://redirect.github.com/detekt/detekt/pull/5569)
- Fix typo - [#5557](https://redirect.github.com/detekt/detekt/pull/5557)
##### Contributors
We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@BeBAKE](https://redirect.github.com/BeBAKE), [@BraisGabin](https://redirect.github.com/BraisGabin), [@Goooler](https://redirect.github.com/Goooler), [@SaumyaBhushan](https://redirect.github.com/SaumyaBhushan), [@TWiStErRob](https://redirect.github.com/TWiStErRob), [@VitalyVPinchuk](https://redirect.github.com/VitalyVPinchuk), [@adef145](https://redirect.github.com/adef145), [@asomov](https://redirect.github.com/asomov), [@atulgpt](https://redirect.github.com/atulgpt), [@chao2zhang](https://redirect.github.com/chao2zhang), [@cketti](https://redirect.github.com/cketti), [@cortinico](https://redirect.github.com/cortinico), [@drawers](https://redirect.github.com/drawers), [@dzirbel](https://redirect.github.com/dzirbel), [@igorwojda](https://redirect.github.com/igorwojda), [@lexa-diky](https://redirect.github.com/lexa-diky), [@luanpotter](https://redirect.github.com/luanpotter), [@marschwar](https://redirect.github.com/marschwar), [@mjovanc](https://redirect.github.com/mjovanc), [@mmorozkov](https://redirect.github.com/mmorozkov), [@ncteisen](https://redirect.github.com/ncteisen), [@osipxd](https://redirect.github.com/osipxd), [@ov7a](https://redirect.github.com/ov7a), [@schalkms](https://redirect.github.com/schalkms), [@t-kameyama](https://redirect.github.com/t-kameyama), [@tresni](https://redirect.github.com/tresni)
See all issues at: [1.23.0](https://redirect.github.com/detekt/detekt/milestone/88)
### [`v1.22.0`](https://redirect.github.com/detekt/detekt/releases/tag/v1.22.0)
We're extremely excited to announce the next upcoming stable release of Detekt: 1.22.0 🚀
This release is coming with 16 new rules, 2 new rulesets and several new functionalities & APIs.
We've also introduced the [**Detekt Marketplace**](https://detekt.dev/marketplace), a place for users to share their 3rd party rules and extensions.
We want to take the opportunity to thank [our Sponsors](https://redirect.github.com/sponsors/detekt) and our Contributors for testing, bug reporting and helping us release this new version of Detekt. You're more than welcome to join our community on the [#detekt](https://kotlinlang.slack.com/archives/C88E12QH4) channel on KotlinLang's Slack (you can [get an invite here](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up)).
##### Notable Changes
- We're introducing the [**Detekt Marketplace**](https://detekt.dev/marketplace), a place where you can add your own 3rd party extension such as rule, plugins, custom reporter, etc. - [#5191](https://redirect.github.com/detekt/detekt/pull/5191)
- Our website is now versioned. You can find the changes for each version using the dropdown menu on the top bar. Documentation for the upcoming version (next) [can be found here](https://detekt.dev/docs/next/intro).
- We added **16** new Rules to Detekt
- `AlsoCouldBeApply` - [#5333](https://redirect.github.com/detekt/detekt/pull/5333)
- `MultilineRawStringIndentation` - [#5058](https://redirect.github.com/detekt/detekt/pull/5058)
- `TrimMultilineRawString` - [#5051](https://redirect.github.com/detekt/detekt/pull/5051)
- `UnnecessaryNotNullCheck` - [#5218](https://redirect.github.com/detekt/detekt/pull/5218)
- `UnnecessaryPartOfBinaryExpression` - [#5203](https://redirect.github.com/detekt/detekt/pull/5203)
- `UseSumOfInsteadOfFlatMapSize` - [#5405](https://redirect.github.com/detekt/detekt/pull/5405)
- `FunctionReturnTypeSpacing` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256)
- `FunctionSignature` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256)
- `FunctionStartOfBodySpacing` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256)
- `NullableTypeSpacing` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256)
- `ParameterListSpacing` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256)
- `SpacingBetweenFunctionNameAndOpeningParenthesis` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256)
- `TrailingCommaOnCallSite` from KtLint - [#5312](https://redirect.github.com/detekt/detekt/pull/5312)
- `TrailingCommaOnDeclarationSite` from KtLint - [#5312](https://redirect.github.com/detekt/detekt/pull/5312)
- `TypeParameterListSpacing` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256)
- We added a new ruleset called `detekt-rules-ruleauthors` containing rules for Rule Authors to enforce best practices on Detekt rules such as the new `ViolatesTypeResolutionRequirements` - [#5129](https://redirect.github.com/detekt/detekt/pull/5129) [#5182](https://redirect.github.com/detekt/detekt/pull/5182)
- We added a new ruleset called `detekt-rules-libraries` containing rules mostly useful for Library Authors - We moved the following rules inside `ForbiddenPublicDataClass`, `LibraryCodeMustSpecifyReturnType`, `LibraryEntitiesShouldNotBePublic` this new ruleset - See Migration below on how to migrate [#5360](https://redirect.github.com/detekt/detekt/pull/5360)
- We added support for JVM toolchain. This means that Detekt will now respect the JDK toolchain you specify on your Gradle configuration. You will also be able to specify a custom JDK home with the `--jdk-home` CLI parameter - [#5269](https://redirect.github.com/detekt/detekt/pull/5269)
- Improvement for Type Resolution
- We will now skip rules annotated with `@RequiresTypeResolution` when without Type Resolution - [#5176](https://redirect.github.com/detekt/detekt/pull/5176)
- We will warn users if they run rules requiring Type Resolution when Type Resolution is disabled, so they're not silently skipped - [#5226](https://redirect.github.com/detekt/detekt/pull/5226)
- Improvement for Config Management
- We added exhaustiveness check during config validation. You can enable it `checkExhaustiveness: true` in your config file. This is disabled by default. - [#5089](https://redirect.github.com/detekt/detekt/pull/5089)
- We added support for generating custom configuration for rule authors - [#5080](https://redirect.github.com/detekt/detekt/pull/5080)
- Deprecations & Removals
- We deprecated the MultiRule class as it was overly complicated. The suggested approach is to just provide separated rules. - [#5161](https://redirect.github.com/detekt/detekt/pull/5161)
- The `--fail-fast` CLI flag (and `failFast` Gradle property) has been removed. It was deprecated since 1.16.x - [#5290](https://redirect.github.com/detekt/detekt/pull/5290)
- We **deprecated** the following rules `DuplicateCaseInWhenExpression`, `MissingWhenCase`, `RedundantElseInWhen` as the Kotlin Compiler is already reporting errors for those scenarios - [#5309](https://redirect.github.com/detekt/detekt/pull/5309)
- We removed the `--print-ast` CLI flag as [PsiViewer](https://www.jetbrains.com/help/idea/psi-viewer.html) provides the same features - [#5418](https://redirect.github.com/detekt/detekt/pull/5418)
- Notable changes to existing rules
- `ArrayPrimitive` is now working only with Type Resolution - [#5175](https://redirect.github.com/detekt/detekt/pull/5175)
- `WildcardImport` is now running also on tests by default - [#5121](https://redirect.github.com/detekt/detekt/pull/5121)
- `ForbiddenImport` allows now to specify a reason for every forbidden import - [#4909](https://redirect.github.com/detekt/detekt/pull/4909)
- `IgnoredReturnValue`: option `restrictToAnnotatedMethods` is now deprecated in favor of `restrictToConfig` - [#4922](https://redirect.github.com/detekt/detekt/pull/4922)
- This version of Detekt is built with Gradle `v7.5.1`, AGP `7.3.1`, Kotlin `1.7.21` and KtLint `0.47.1` (see [#5363](https://redirect.github.com/detekt/detekt/pull/5363) [#5189](https://redirect.github.com/detekt/detekt/pull/5189) [#5411](https://redirect.github.com/detekt/detekt/pull/5411) [#5312](https://redirect.github.com/detekt/detekt/pull/5312) [#5519](https://redirect.github.com/detekt/detekt/pull/5519))
- The minimum supported Gradle version is now `v6.7.1` - [#4964](https://redirect.github.com/detekt/detekt/pull/4964)
##### Migration
We deprecated a number of rules in this release.
You should update your config file as follows:
```diff
potential-bugs:
active: true
...
- DuplicateCaseInWhenExpression:
- active: true
...
- MissingWhenCase:
- active: true
- allowElseExpression: true
...
- RedundantElseInWhen:
- active: true
style:
active: true
...
- ForbiddenPublicDataClass:
- active: true
- excludes: ['**']
- ignorePackages:
- - '*.internal'
- - '*.internal.*'
...
- LibraryCodeMustSpecifyReturnType:
- active: true
- excludes: ['**']
...
- LibraryEntitiesShouldNotBePublic:
- active: true
- excludes: ['**']
```
If you wish to use the `libraries` ruleset we introduced you should add the following to your config file:
```diff
+ libraries:
+ active: true
+ ForbiddenPublicDataClass:
+ active: false
+ LibraryEntitiesShouldNotBePublic:
+ active: false
+ LibraryCodeMustSpecifyReturnType:
+ active: true
```
and add the following to you `build.gradle` file:
```kotlin
detektPlugins("io.gitlab.arturbosch.detekt:detekt-rules-libraries:$version")
```
If you're using our KtLint wrapper (i.e. `detekt-formatting`) you should also update your config file as follows:
```diff
formatting:
active: true
...
- TrailingComma:
- active: false
- autoCorrect: true
- allowTrailingComma: false
- allowTrailingCommaOnCallSite: false
...
+ TrailingCommaOnCallSite:
+ active: false
+ autoCorrect: true
+ useTrailingCommaOnCallSite: false
+ TrailingCommaOnDeclarationSite:
+ active: false
+ autoCorrect: true
+ useTrailingCommaOnDeclarationSite: false
```
##### Changelog
- ReturnCount: correctly count assignment expressions with elvis return as guard clauses - [#5539](https://redirect.github.com/detekt/detekt/pull/5539)
- UnnecessaryPartOfBinaryExpression: fix false positive with pair creation - [#5516](https://redirect.github.com/detekt/detekt/pull/5516)
- False positive at `UnnecessaryPartOfBinaryExpression` - [#5514](https://redirect.github.com/detekt/detekt/issues/5514)
- Update documentation for TrailingComma rules - [#5513](https://redirect.github.com/detekt/detekt/pull/5513)
- `TrimMultilineRawString` false-positive on annotation parameters - [#5476](https://redirect.github.com/detekt/detekt/issues/5476)
- Detekt 1.22.0-RC1 -> 1.22.0-RC2 breaks UnreachableCode - [#5435](https://redirect.github.com/detekt/detekt/issues/5435)
- Detekt 1.22.0-RC1 -> 1.22.0-RC2 breaks ignoreAnnotated - [#5427](https://redirect.github.com/detekt/detekt/issues/5427)
- Fix issues introduced by [#5152](https://redirect.github.com/detekt/detekt/issues/5152) - [#5508](https://redirect.github.com/detekt/detekt/pull/5508)
- MultilineLambdaItParameter: fix false positive for one-line statements with a lambda argument - [#5505](https://redirect.github.com/detekt/detekt/pull/5505)
- UseArrayLiteralsInAnnotations: fix false negative with primitive array factory calls - [#5482](https://redirect.github.com/detekt/detekt/pull/5482)
- TrimMultilineRawString: fix false positive when it's expected as constant - [#5480](https://redirect.github.com/detekt/detekt/pull/5480)
- Fix false negative `SafeCast` with no braces - [#5479](https://redirect.github.com/detekt/detekt/pull/5479)
- Update gradle/wrapper-validation-action digest to [`55e685c`](https://redirect.github.com/detekt/detekt/commit/55e685c) - [#5472](https://redirect.github.com/detekt/detekt/pull/5472)
- Grant permission for type resolution Gradle job - [#5470](https://redirect.github.com/detekt/detekt/pull/5470)
- Fix ObjectPropertyNaming Rule false positive - [#5466](https://redirect.github.com/detekt/detekt/pull/5466)
- Fix LambdaParameterNaming rule false positive - [#5465](https://redirect.github.com/detekt/detekt/pull/5465)
- Fix ReturnCount false positive when excludeReturnFromLambda is enabled - [#5459](https://redirect.github.com/detekt/detekt/pull/5459)
- CognitiveComplexity: count else/else-if as one complexity - [#5458](https://redirect.github.com/detekt/detekt/pull/5458)
- Fix false positive MultilineRawStringIndentation with tab indentation - [#5453](https://redirect.github.com/detekt/detekt/pull/5453)
- Don't show the number of issues generating the BindingContext - [#5449](https://redirect.github.com/detekt/detekt/pull/5449)
- Make detekt less noisy - [#5448](https://redirect.github.com/detekt/detekt/pull/5448)
- New ruleauthors rule for
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
1.21.0
->1.23.7
1.21.0
->1.23.7
Release Notes
detekt/detekt (io.gitlab.arturbosch.detekt)
### [`v1.23.7`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.7) ##### 1.23.7 - 2024-09-08 This is a point release for Detekt `1.23.0`, built against Kotlin `2.0.10`, with fixes for several bugs that got reported by the community. ##### Notable Changes - fix(deps): update kotlin monorepo to v2.0.10 - [#7517](https://redirect.github.com/detekt/detekt/pull/7517) - Update to Kotlin 2.0.0 [#6640](https://redirect.github.com/detekt/detekt/pull/6640) - fix(deps): update kotlin monorepo to v1.9.24 - [#7264](https://redirect.github.com/detekt/detekt/pull/7264) - fix(deps): update dependency com.android.tools.build:gradle to v8.5.2 - [#7525](https://redirect.github.com/detekt/detekt/pull/7525) - chore(deps): update dependency gradle to v8.10 - [#7546](https://redirect.github.com/detekt/detekt/pull/7546) ##### Changelog - Add basic support for isolated projects to 1.x - [#7526](https://redirect.github.com/detekt/detekt/pull/7526) - ExplicitCollectionElementAccessMethod: fix false positive when Map put has 3 arguments - [#7563](https://redirect.github.com/detekt/detekt/pull/7563) - BracesOnIfStatements: fix false-positive when chained - [#7444](https://redirect.github.com/detekt/detekt/pull/7444) - Add enum entry check in `UndocumentedPublicProperty` - [#7426](https://redirect.github.com/detekt/detekt/pull/7426) - Use the anchor which is already present before - [#7423](https://redirect.github.com/detekt/detekt/pull/7423) - Fix small corner-case in "SerialVersionUIDInSerializableClass" rule, … - [#7346](https://redirect.github.com/detekt/detekt/pull/7346) - SwallowedException: fix false positive when exception is used as a receiver - [#7288](https://redirect.github.com/detekt/detekt/pull/7288) - NamedArguments: fix false positive on spread varargs - [#7283](https://redirect.github.com/detekt/detekt/pull/7283) - MultilineLambdaItParameter: fix false negative with single statement on multiple lines - [#7221](https://redirect.github.com/detekt/detekt/pull/7221) - Check for root of receiver in selector expression - [#7220](https://redirect.github.com/detekt/detekt/pull/7220) - Check for `public companion` object for `UndocumentedPublicClass` - [#7219](https://redirect.github.com/detekt/detekt/pull/7219) - fix: TopLevelPropertyNaming also detecting extension property name - [#7212](https://redirect.github.com/detekt/detekt/pull/7212) - Publish detekt-compiler-plugin-all to Maven and GH Releases - [#7179](https://redirect.github.com/detekt/detekt/pull/7179) - versioned default detekt config file link - [#7161](https://redirect.github.com/detekt/detekt/pull/7161) - Support rangeUntil operator for UnusedImport rule - [#7104](https://redirect.github.com/detekt/detekt/pull/7104) - Fix false positive on it usages when type parameter is specified - [#6850](https://redirect.github.com/detekt/detekt/pull/6850) ##### Housekeeping/Docs - \[bugfix] AnnotationOnSeparateLine in snippets - [#6526](https://redirect.github.com/detekt/detekt/pull/6526) - Add docs about using the Compiler Plugin with the Kotlin CLI compiler - [#7184](https://redirect.github.com/detekt/detekt/pull/7184) ### [`v1.23.6`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.6) ##### 1.23.6 - 2024-03-23 This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.23` and fixed several bugs that got reported by the community. ##### Changelog - UselessPostfixExpression - Fix [#7037](https://redirect.github.com/detekt/detekt/issues/7037) false positive postfix - [#7084](https://redirect.github.com/detekt/detekt/pull/7084) - Don't allow invalid Source Locations - [#7030](https://redirect.github.com/detekt/detekt/pull/7030) - UnusedPrivateClass: don't report if private classes are used for type conversion - [#6995](https://redirect.github.com/detekt/detekt/pull/6995) - RedundantSuspendModifier: do not report when the function has 'actual' modifier - [#6951](https://redirect.github.com/detekt/detekt/pull/6951) - Update dependency gradle to v8.7 - [#7080](https://redirect.github.com/detekt/detekt/pull/7080) - Update kotlin monorepo to v1.9.23 - [#7027](https://redirect.github.com/detekt/detekt/pull/7027) - Update dependency gradle to v8.6 - [#6939](https://redirect.github.com/detekt/detekt/pull/6939) - Update dependency com.android.tools.build:gradle to v8.3.1 - [#7070](https://redirect.github.com/detekt/detekt/pull/7070) ##### Contributors We would like to thank the following contributors that made this release possible: [@BraisGabin](https://redirect.github.com/BraisGabin), [@psuzn](https://redirect.github.com/psuzn), [@t-kameyama](https://redirect.github.com/t-kameyama). ### [`v1.23.5`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.5) This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.22` and fixed several bugs that got reported by the community. ##### Notable Changes - Test Gradle plugin with AGP 8.2.0 - [#6672](https://redirect.github.com/detekt/detekt/pull/6672) - chore(deps): update dependency gradle to v8.5 - [#6663](https://redirect.github.com/detekt/detekt/pull/6663) - fix(deps): update kotlin monorepo to v1.9.22 - [#6746](https://redirect.github.com/detekt/detekt/pull/6746) ##### Changelog - Report rule's default severity in sarif backport - [#6916](https://redirect.github.com/detekt/detekt/pull/6916) - Add ignoreAnnotatedFunctions to TooManyFunctions - [#6875](https://redirect.github.com/detekt/detekt/pull/6875) - Fix by checking the existence of label in previous statements - [#6671](https://redirect.github.com/detekt/detekt/pull/6671) - Also check `USELESS_ELVIS` in `UnreachableCode` - [#6624](https://redirect.github.com/detekt/detekt/pull/6624) - Fix by adding last method call to the set - [#6567](https://redirect.github.com/detekt/detekt/pull/6567) ##### Housekeeping & Refactorings - Opt in to ExperimentalCompilerApi in all compilations in compiler-plugin - [#6534](https://redirect.github.com/detekt/detekt/pull/6534) ##### Contributors We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@TWiStErRob](https://redirect.github.com/TWiStErRob), [@atulgpt](https://redirect.github.com/atulgpt), [@matejdro](https://redirect.github.com/matejdro) ### [`v1.23.4`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.4) ##### 1.23.4 - 2023-11-26 This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.21` and fixed several bugs that got reported by the community. ##### Notable Changes - fix(deps): update kotlin monorepo to v1.9.21 - [#6642](https://redirect.github.com/detekt/detekt/pull/6642) - fix(deps): update kotlin monorepo to v1.9.20 - [#6572](https://redirect.github.com/detekt/detekt/pull/6572) ##### Changelog - Update the ruleset regex to allow numbers - [#6635](https://redirect.github.com/detekt/detekt/pull/6635) - Show deprecation message - [#6614](https://redirect.github.com/detekt/detekt/pull/6614) - Add io.gitlab.arturbosch.detekt.generator.Main to the jar manifest - [#6613](https://redirect.github.com/detekt/detekt/pull/6613) - Don't report FunctionNaming when the function's name equals to the return type's name with type arguments - [#6605](https://redirect.github.com/detekt/detekt/pull/6605) - Fix issues related to kotlin-stdlib's Gradle module metadata in Kotlin 1.9.20 - [#6590](https://redirect.github.com/detekt/detekt/pull/6590) - MethodSignature - Add the condition of receiver should be null - [#6570](https://redirect.github.com/detekt/detekt/pull/6570) - Remove check for deprectated functions toUpperCase and toLowerCase - [#6548](https://redirect.github.com/detekt/detekt/pull/6548) - Fixes false positive of trailing whitespaces in kdoc - [#6370](https://redirect.github.com/detekt/detekt/pull/6370) ##### Dependency Updates - Update tested AGP version to 8.1.3 - [#6610](https://redirect.github.com/detekt/detekt/pull/6610) - Switch to kctfork for Kotlin compilation testing - [#6589](https://redirect.github.com/detekt/detekt/pull/6589) ##### Contributors We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@BraisGabin](https://redirect.github.com/BraisGabin), [@Gosunet](https://redirect.github.com/Gosunet), [@atulgpt](https://redirect.github.com/atulgpt), [@t-kameyama](https://redirect.github.com/t-kameyama) ### [`v1.23.3`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.3) ##### 1.23.3 - 2023-10-31 This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.10` and fixed several bugs that got reported by the community. NOTE: This is a republishing of 1.23.2 which was accidentally published against Kotlin 1.9.0 instead of 1.9.10 ##### Changelog - Consider deprecated rules as inactive when running allRules [#6381](https://redirect.github.com/detekt/detekt/pull/6381) - Fix inputstream leaking file descriptor in Gradle - [#6519](https://redirect.github.com/detekt/detekt/pull/6519) - ForbiddenMethodCall - Handle sequence of overridden methods - [#6478](https://redirect.github.com/detekt/detekt/pull/6478) - Function to return supported Kotlin version - [#6472](https://redirect.github.com/detekt/detekt/pull/6472) - Fix false negative `IgnoredReturnValue` with scope functions - [#6446](https://redirect.github.com/detekt/detekt/pull/6446) - UnconditionalJumpStatementInLoop: don't report a conditional break in a single body expression - [#6443](https://redirect.github.com/detekt/detekt/pull/6443) - Fix reporting unused imports at file level - [#6390](https://redirect.github.com/detekt/detekt/pull/6390) - OutdatedDocumentation - Detect param which private property documented as property - [#6372](https://redirect.github.com/detekt/detekt/pull/6372) - NullableToStringCall: fix false negative in lambda - [#6352](https://redirect.github.com/detekt/detekt/pull/6352) - Correctly set scheme for URIs in the SARIF report output - [#6331](https://redirect.github.com/detekt/detekt/pull/6331) - SleepInsteadOfDelay - Find the parent for suspend check - [#6191](https://redirect.github.com/detekt/detekt/pull/6191) ##### Dependency Updates - Update kotlin monorepo to v1.9.10 - [#6423](https://redirect.github.com/detekt/detekt/pull/6423) - Update dependency gradle to v8.4 - [#6522](https://redirect.github.com/detekt/detekt/pull/6522) - Update dependency gradle to v8.3 - [#6406](https://redirect.github.com/detekt/detekt/pull/6406) - Update com.android.tools.build to 8.1.1 - [#6419](https://redirect.github.com/detekt/detekt/pull/6419) - update dependency org.jetbrains.dokka to v1.9.10 - [#6549](https://redirect.github.com/detekt/detekt/pull/6549) ##### Contributors We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@arturbosch](https://redirect.github.com/arturbosch), [@atulgpt](https://redirect.github.com/atulgpt), [@kkocel](https://redirect.github.com/kkocel), [@marschwar](https://redirect.github.com/marschwar), [@pablobaxter](https://redirect.github.com/pablobaxter), [@t-kameyama](https://redirect.github.com/t-kameyama) ### [`v1.23.2`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.2) ##### 1.23.2 - 2023-10-29 **NOTE: Please use version 1.23.3 instead - Version 1.23.2 was accidentally built against Kotlin 1.9.0 instead of 1.9.10** https://github.com/detekt/detekt/releases/tag/v1.23.3 This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.10` and fixed several bugs that got reported by the community. ##### Changelog - Consider deprecated rules as inactive when running allRules [#6381](https://redirect.github.com/detekt/detekt/pull/6381) - Fix inputstream leaking file descriptor in Gradle - [#6519](https://redirect.github.com/detekt/detekt/pull/6519) - ForbiddenMethodCall - Handle sequence of overridden methods - [#6478](https://redirect.github.com/detekt/detekt/pull/6478) - Function to return supported Kotlin version - [#6472](https://redirect.github.com/detekt/detekt/pull/6472) - Fix false negative `IgnoredReturnValue` with scope functions - [#6446](https://redirect.github.com/detekt/detekt/pull/6446) - UnconditionalJumpStatementInLoop: don't report a conditional break in a single body expression - [#6443](https://redirect.github.com/detekt/detekt/pull/6443) - Fix reporting unused imports at file level - [#6390](https://redirect.github.com/detekt/detekt/pull/6390) - OutdatedDocumentation - Detect param which private property documented as property - [#6372](https://redirect.github.com/detekt/detekt/pull/6372) - NullableToStringCall: fix false negative in lambda - [#6352](https://redirect.github.com/detekt/detekt/pull/6352) - Correctly set scheme for URIs in the SARIF report output - [#6331](https://redirect.github.com/detekt/detekt/pull/6331) - SleepInsteadOfDelay - Find the parent for suspend check - [#6191](https://redirect.github.com/detekt/detekt/pull/6191) ##### Dependency Updates - Update kotlin monorepo to v1.9.10 - [#6423](https://redirect.github.com/detekt/detekt/pull/6423) - Update dependency gradle to v8.4 - [#6522](https://redirect.github.com/detekt/detekt/pull/6522) - Update dependency gradle to v8.3 - [#6406](https://redirect.github.com/detekt/detekt/pull/6406) - Update com.android.tools.build to 8.1.1 - [#6419](https://redirect.github.com/detekt/detekt/pull/6419) - update dependency org.jetbrains.dokka to v1.9.10 - [#6549](https://redirect.github.com/detekt/detekt/pull/6549) ##### Contributors We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@arturbosch](https://redirect.github.com/arturbosch), [@atulgpt](https://redirect.github.com/atulgpt), [@kkocel](https://redirect.github.com/kkocel), [@marschwar](https://redirect.github.com/marschwar), [@pablobaxter](https://redirect.github.com/pablobaxter), [@t-kameyama](https://redirect.github.com/t-kameyama) ### [`v1.23.1`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.1) ##### 1.23.1 - 2023-07-30 This is a point release for Detekt `1.23.0`, where we added support for Kotlin `1.9.0` and fixed several bugs that got reported by the community. ##### Notable Changes - Bumped Kotlin to v1.9.0 - [#6258](https://redirect.github.com/detekt/detekt/pull/6258) - Bumped KtLint to v0.50.0 - [#6239](https://redirect.github.com/detekt/detekt/pull/6239) - Updated CLI to reflect Java 20 support - [#6277](https://redirect.github.com/detekt/detekt/pull/6277) ##### Changelog - Add missing jdkHome and languageVersion properties to DetektCreateBaselineTask - [#6284](https://redirect.github.com/detekt/detekt/pull/6284) - Make InvalidRange aware of rangeUntil operator - [#6264](https://redirect.github.com/detekt/detekt/pull/6264) - MaxChainedCallsOnSameLine: don't count class references as chained calls - [#6224](https://redirect.github.com/detekt/detekt/pull/6224) - CanBeNonNullable: Fix false positive when property is defined after assignment - [#6210](https://redirect.github.com/detekt/detekt/pull/6210) - Add `..<` and `rangeTo` in the `ForEachOnRange` rule - [#6197](https://redirect.github.com/detekt/detekt/pull/6197) - Don't report `UseDataClass` if class contains non-property parameters - [#6173](https://redirect.github.com/detekt/detekt/pull/6173) - Allow documenting public fun name when same private variable is present - [#6165](https://redirect.github.com/detekt/detekt/pull/6165) - Find range call using recursion - [#6164](https://redirect.github.com/detekt/detekt/pull/6164) - StringShouldBeRawString: Ignore `replaceIndent` and `prependIndent` - [#6154](https://redirect.github.com/detekt/detekt/pull/6154) - UnusedPrivateProperty: Fix false postive by ignoring data classes - [#6151](https://redirect.github.com/detekt/detekt/pull/6151) - PropertyUsedBeforeDeclaration: fix false positive in nested/inner class - [#6139](https://redirect.github.com/detekt/detekt/pull/6139) ##### Dependency Updates - Update dependency gradle to v8.2.1 - [#6274](https://redirect.github.com/detekt/detekt/pull/6274) - Switch to SLF4J 2.x - [#6266](https://redirect.github.com/detekt/detekt/pull/6266) - Update kotlin monorepo to v1.8.22 - [#6192](https://redirect.github.com/detekt/detekt/pull/6192) ##### Contributors We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@Goooler](https://redirect.github.com/Goooler), [@Hexcles](https://redirect.github.com/Hexcles), [@PoisonedYouth](https://redirect.github.com/PoisonedYouth), [@TWiStErRob](https://redirect.github.com/TWiStErRob), [@VirtualParticle](https://redirect.github.com/VirtualParticle), [@atulgpt](https://redirect.github.com/atulgpt), [@cortinico](https://redirect.github.com/cortinico), [@dzirbel](https://redirect.github.com/dzirbel), [@eygraber](https://redirect.github.com/eygraber), [@marschwar](https://redirect.github.com/marschwar), [@rmarquis](https://redirect.github.com/rmarquis), [@segunfamisa](https://redirect.github.com/segunfamisa), [@severn-everett](https://redirect.github.com/severn-everett), [@t-kameyama](https://redirect.github.com/t-kameyama) [See all commit history here](https://redirect.github.com/detekt/detekt/compare/v1.23.0...v1.23.1) ### [`v1.23.0`](https://redirect.github.com/detekt/detekt/releases/tag/v1.23.0) We're so proud to announce the next upcoming stable release of detekt: 1.23.0 🚀 This release is coming with 25 new rules and much more. We moved the detekt-compiler-plugin to the main repo, and you can now use it in your builds [following the official documentation](https://detekt.dev/docs/gettingstarted/compilerplugin). This release also marks the beginning of development of 2.x from the main branch! [You can follow the progress here](https://redirect.github.com/detekt/detekt/discussions/6035) We want to take the opportunity to thank [our Sponsors](https://redirect.github.com/sponsors/detekt) and our Contributors for testing, bug reporting and helping us release this new version of Detekt. You're more than welcome to join our community on the [#detekt](https://kotlinlang.slack.com/archives/C88E12QH4) channel on KotlinLang's Slack (you can [get an invite here](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up)). ##### Notable Changes - This is the first version of Detekt that ships with the `detekt-compiler-plugin`. The [Detekt Compiler plugin](https://detekt.dev/docs/gettingstarted/compilerplugin) is still experimental, but we're moving it closer to Detekt to make it easier to integrate. From now on the compiler plugin will follow the same versioning schema as Detekt. We invite you to try it and provide feedback till we stabilize it. You can read more about it in the [official documentation page](https://detekt.dev/docs/gettingstarted/compilerplugin) - [#5492](https://redirect.github.com/detekt/detekt/pull/5492) - We added **25** new Rules to detekt - `BracesOnIfStatements` - [#5700](https://redirect.github.com/detekt/detekt/pull/5700) - `BracesOnWhenStatements` - [#5838](https://redirect.github.com/detekt/detekt/pull/5838) - `CastNullableToNonNullableType` - [#5653](https://redirect.github.com/detekt/detekt/pull/5653) - `DoubleNegativeLambda` - [#5937](https://redirect.github.com/detekt/detekt/pull/5937) - `ForbiddenAnnotation` - [#5515](https://redirect.github.com/detekt/detekt/pull/5515) - `PropertyUsedBeforeDeclaration` - [#6062](https://redirect.github.com/detekt/detekt/pull/6062) - `StringShouldBeRawString` - [#5705](https://redirect.github.com/detekt/detekt/pull/5705) - `SuspendFunSwallowedCancellation` - [#5666](https://redirect.github.com/detekt/detekt/pull/5666) - `UnusedParameter` - [#5722](https://redirect.github.com/detekt/detekt/pull/5722) - `UnusedPrivateProperty` - [#5722](https://redirect.github.com/detekt/detekt/pull/5722) - `UseLet` - [#6091](https://redirect.github.com/detekt/detekt/pull/6091) - `UnnecessaryBracesAroundTrailingLambda` - [#6029](https://redirect.github.com/detekt/detekt/pull/6029) - Plus the bump to KtLint 0.49.1 added the following rules to the `detekt-formatting` ruleset: - `ClassName` - [#6037](https://redirect.github.com/detekt/detekt/pull/6037) - `EnumWrapping` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028) - `FunctionName` - [#6037](https://redirect.github.com/detekt/detekt/pull/6037) - `IfElseBracing` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028) - `IfElseWrapping` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028) - `MultilineExpressionWrapping` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028) - `NoBlankLineInList` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028) - `NoConsecutiveComments` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028) - `NoEmptyFirstLineInClassBody` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028) - `NoSingleLineBlockCommentRule` - [#6104](https://redirect.github.com/detekt/detekt/pull/6104) - `ParameterWrapping` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028) - `PropertyName` - [#6037](https://redirect.github.com/detekt/detekt/pull/6037) - `PropertyWrapping` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028) - `StringTemplateIndent` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028) - `TryCatchFinallySpacing` - [#6028](https://redirect.github.com/detekt/detekt/pull/6028) - Notable changes to existing rules: - `UnnecessaryAbstractClass` now only runs with type resolution - [#5829](https://redirect.github.com/detekt/detekt/pull/5829) - `UnusedPrivateMember` has been refactored with some of its logic moved to `UnusedParameter` and `UnusedPrivateProperty` - [#5722](https://redirect.github.com/detekt/detekt/pull/5722) - Removed the `ignoreOverridden` config from `BooleanPropertyNaming`, `ConstructorParameterNaming`, `FunctionNaming`, `VariableNaming` and `FunctionParameterNaming` as not useful for those rules - [#5718](https://redirect.github.com/detekt/detekt/pull/5718) - Added `ignoredSubjectTypes` to rule `ElseCaseInsteadOfExhaustiveWhen` to specify types that should be ignored by the rule ([#5623](https://redirect.github.com/detekt/detekt/issues/5623)) - [#5634](https://redirect.github.com/detekt/detekt/pull/5634) - Added `allowOperators` to rule `DataClassContainsFunctions` - [#5658](https://redirect.github.com/detekt/detekt/pull/5658) - `MandatoryBracesIfStatements` has been removed in favor of `BracesOnIfStatements` - [#5700](https://redirect.github.com/detekt/detekt/pull/5700) - Added `ignoreWhenContainingVariableDeclaration` to `UseIfInsteadOfWhen` to ignore captured variables - [#5681](https://redirect.github.com/detekt/detekt/pull/5681) - Several rules in the `detekt-formatting` ruleset now accepts an `indentSize` parameter (see the [full list here](https://redirect.github.com/detekt/detekt/pull/6028/files#diff-2486d56e6f1bbfcb160b923d15266691f5776948cf5bb31c8fc102bd3cf9513d)). - We followed the KtLint decisions on turning on some rules by default, so several rules in the `detekt-formatting` ruleset are now turned on by default (see the [full list here](https://redirect.github.com/detekt/detekt/pull/6028/files#diff-2486d56e6f1bbfcb160b923d15266691f5776948cf5bb31c8fc102bd3cf9513d)). - We added support for Gradle's Worker API inside Detekt Gradle Plugin, for faster execution on bigger projects. - [#4128](https://redirect.github.com/detekt/detekt/pull/4128) - We fixed the `includes`/`excludes` logic on the config file as they were overriding each other - [#5782](https://redirect.github.com/detekt/detekt/pull/5782) - We fully removed support for Spek from `detekt-test-utils`. The recommended testing framework is JUnit - [#5785](https://redirect.github.com/detekt/detekt/pull/5785) - The minimum supported Gradle version is now `v6.8.3` - [#5616](https://redirect.github.com/detekt/detekt/pull/5616) - This version of detekt is built with Gradle `v8.1`, AGP `8.0.1`, Kotlin `1.8.21` and KtLint `0.49.1` (see [#5893](https://redirect.github.com/detekt/detekt/pull/5893) [#5723](https://redirect.github.com/detekt/detekt/pull/5723) [#5877](https://redirect.github.com/detekt/detekt/pull/5877) [#6028](https://redirect.github.com/detekt/detekt/pull/6028) [#6043](https://redirect.github.com/detekt/detekt/pull/6043) [#5995](https://redirect.github.com/detekt/detekt/pull/5995) [#5996](https://redirect.github.com/detekt/detekt/pull/5996)) - We now added a [Code of Conduct](https://redirect.github.com/detekt/detekt/blob/main/.github/CODE_OF_CONDUCT.md) to our repo. Please read it and follow it when interacting with our community on our channels. ##### Changelog - SerialVersionUIDInSerializableClass - Update the error location - [#6114](https://redirect.github.com/detekt/detekt/pull/6114) - Reduce LoopWithTooManyJumpStatements finding scope - [#6110](https://redirect.github.com/detekt/detekt/pull/6110) - Add alias for SuspendFunWithCoroutineScopeReceiver - [#6089](https://redirect.github.com/detekt/detekt/pull/6089) - CastNullableToNonNullableType - Check the SimpleType instead of typeElement - [#6071](https://redirect.github.com/detekt/detekt/pull/6071) - Update plugin com.gradle.enterprise to v3.13.1 - [#6069](https://redirect.github.com/detekt/detekt/pull/6069) - CanBeNonNullable: Check parent condition for checking if nullability info is used or not - [#6064](https://redirect.github.com/detekt/detekt/pull/6064) - Add configuration to add alternate trimming methods - [#6063](https://redirect.github.com/detekt/detekt/pull/6063) - Check if property is documented at class header - [#6061](https://redirect.github.com/detekt/detekt/pull/6061) - OutdatedDocumentation - Check if only public property is documented - [#6057](https://redirect.github.com/detekt/detekt/pull/6057) - UnnecessaryLet: fix false positive in call chains - [#6052](https://redirect.github.com/detekt/detekt/pull/6052) - Add `comments` with a list of regexes to `ForbiddenComment` - [#5981](https://redirect.github.com/detekt/detekt/pull/5981) - Fix incomplete `requireRootInDeclaration` check in `InvalidPackageDeclaration` - [#6045](https://redirect.github.com/detekt/detekt/pull/6045) - BracesOnWhenStatements: fix false positive for necessary braces - [#6042](https://redirect.github.com/detekt/detekt/pull/6042) - Fix redundant ClassOrdering violations using maximum increasing section - [#6003](https://redirect.github.com/detekt/detekt/pull/6003) - UseIsNullOrEmpty: fix false negative with chained call - [#6027](https://redirect.github.com/detekt/detekt/pull/6027) - Create docs for Gradle Worker API - [#6016](https://redirect.github.com/detekt/detekt/pull/6016) - Compile compiler plugin against kotlin-compiler-embeddable - [#6012](https://redirect.github.com/detekt/detekt/pull/6012) - Update intro.mdx to use setFrom() on detekt config - [#6010](https://redirect.github.com/detekt/detekt/pull/6010) - Use `detekt-versions.properties` instead of `versions.properties` - [#6006](https://redirect.github.com/detekt/detekt/pull/6006) - Implement parentPath accessor in concrete config implementations - [#6002](https://redirect.github.com/detekt/detekt/pull/6002) - Increase ALIASES_LIMIT to 100 for YamlConfig - [#5986](https://redirect.github.com/detekt/detekt/pull/5986) - Fix elvis to +/- case in case UnnecessaryParentheses when precedence is unclear - [#5983](https://redirect.github.com/detekt/detekt/pull/5983) - jdkHome as [@Internal](https://redirect.github.com/Internal) - [#5978](https://redirect.github.com/detekt/detekt/pull/5978) - Fix broken POM file for detetk-compiler-plugin - [#5971](https://redirect.github.com/detekt/detekt/pull/5971) - Fix broken publishToMavenLocal - [#5970](https://redirect.github.com/detekt/detekt/pull/5970) - Add `allowOmitUnit` to rule `LibraryCodeMustSpecifyReturnType` - [#5861](https://redirect.github.com/detekt/detekt/pull/5861) - Remove dependency that creates a cycle. - [#5777](https://redirect.github.com/detekt/detekt/pull/5777) - Update dependency org.jetbrains:annotations to v24 - [#5969](https://redirect.github.com/detekt/detekt/pull/5969) - Update github/codeql-action digest to [`8c8d71d`](https://redirect.github.com/detekt/detekt/commit/8c8d71d) - [#5966](https://redirect.github.com/detekt/detekt/pull/5966) - Add functions to ExitOutsideMain rule - [#5963](https://redirect.github.com/detekt/detekt/pull/5963) - Update README.md - [#5954](https://redirect.github.com/detekt/detekt/pull/5954) - Prevent import statements from counting as references for UnusedPrivateProperty - [#5942](https://redirect.github.com/detekt/detekt/pull/5942) - Fix ExpressionBodySyntax not checking property getters/setters - [#5938](https://redirect.github.com/detekt/detekt/pull/5938) - Improve correctness of UnusedPrivateProperty - [#5935](https://redirect.github.com/detekt/detekt/pull/5935) - Fix documentation for deprecated 'reports' object (Issue [#5908](https://redirect.github.com/detekt/detekt/issues/5908)) - [#5924](https://redirect.github.com/detekt/detekt/pull/5924) - Print file path report as link file - [#5921](https://redirect.github.com/detekt/detekt/pull/5921) - "detekt" or "Detekt" - [#5898](https://redirect.github.com/detekt/detekt/issues/5898) - Update JSON schema URL - [#5881](https://redirect.github.com/detekt/detekt/pull/5881) - Add support for local suppression inside formatting - [#5876](https://redirect.github.com/detekt/detekt/pull/5876) - Fix checkExhaustiveness for formatting and third party rules - [#5869](https://redirect.github.com/detekt/detekt/pull/5869) - Allow newline style for MaxChainedCallsOnSameLine - [#5865](https://redirect.github.com/detekt/detekt/pull/5865) - Declare inputs and outputs to support incremental build for testPluginKotlinc - [#5862](https://redirect.github.com/detekt/detekt/pull/5862) - Use code syntax for `Unit` for ImplicitUnitReturnType rule - [#5857](https://redirect.github.com/detekt/detekt/pull/5857) - MatchingDeclarationName. KtFilesSpec also remove .common.kt suffix from kotlin files - [#5851](https://redirect.github.com/detekt/detekt/pull/5851) - Fix double mutability issues with Gradle plugin's use of ConfigurableFileCollection - [#5850](https://redirect.github.com/detekt/detekt/pull/5850) - MagicNumber - Make ignoreNamedArgument catch more complex expression - [#5837](https://redirect.github.com/detekt/detekt/pull/5837) - Exclude super call when generating guard clauses - [#5835](https://redirect.github.com/detekt/detekt/pull/5835) - Enable test retry for all our modules - [#5825](https://redirect.github.com/detekt/detekt/pull/5825) - Stop configuring report merge tasks while configuring Detekt tasks - [#5813](https://redirect.github.com/detekt/detekt/pull/5813) - FunctionMatcher support for fully qualified function names - [#5812](https://redirect.github.com/detekt/detekt/pull/5812) - Boy Scout - [#5808](https://redirect.github.com/detekt/detekt/pull/5808) - Simplify `TestConfig` usages - [#5801](https://redirect.github.com/detekt/detekt/pull/5801) - Reduce configuration of UnusedPrivateMember's split rules - [#5800](https://redirect.github.com/detekt/detekt/pull/5800) - Force SerialVerionUID to be private - [#5798](https://redirect.github.com/detekt/detekt/pull/5798) - Exclude the KMP test folders for android - [#5797](https://redirect.github.com/detekt/detekt/pull/5797) - Add aliases for PackageNaming and InvalidPackageDeclaration - [#5795](https://redirect.github.com/detekt/detekt/pull/5795) - Forbid using Jupiter Kotlin assertions - [#5794](https://redirect.github.com/detekt/detekt/pull/5794) - ModifierOrder: fix false positive with block comments - [#5791](https://redirect.github.com/detekt/detekt/pull/5791) - Fixed ProtectedMemberInFinalClass rule reporting valid JVM finalize - [#5788](https://redirect.github.com/detekt/detekt/pull/5788) - Remove unnecessary usage of BeforeAll in tests - [#5781](https://redirect.github.com/detekt/detekt/pull/5781) - Run Kotlin compiler plugin CLI test as part of standard build - [#5766](https://redirect.github.com/detekt/detekt/pull/5766) - Refactor to remove java.util.Array\* imports - [#5761](https://redirect.github.com/detekt/detekt/pull/5761) - Replace java.util.Stack with Kotlin's ArrayDeque implementation - [#5760](https://redirect.github.com/detekt/detekt/pull/5760) - Replace java.time.Duration with kotlin.time.Duration - [#5759](https://redirect.github.com/detekt/detekt/pull/5759) - Add NixOS installation method to doc - [#5757](https://redirect.github.com/detekt/detekt/pull/5757) - Remove & forbid usage of java.util.stream - [#5756](https://redirect.github.com/detekt/detekt/pull/5756) - Use stdlib functions for file & path operations - [#5754](https://redirect.github.com/detekt/detekt/pull/5754) - Enable UnnecessaryBackticks in detekt project - [#5753](https://redirect.github.com/detekt/detekt/pull/5753) - Update docusaurus monorepo to v2.3.1 - [#5752](https://redirect.github.com/detekt/detekt/pull/5752) - Resolve runtime classpaths consistently with compile classpaths - [#5730](https://redirect.github.com/detekt/detekt/pull/5730) - Exclude new Kotlin Test directories in default config - [#5727](https://redirect.github.com/detekt/detekt/issues/5727) - Fail when unexpected version of kotlin-compiler-embeddable is on runtime classpath - [#5726](https://redirect.github.com/detekt/detekt/pull/5726) - Fix IgnoredReturnValue rule crash in parallel mode - [#5724](https://redirect.github.com/detekt/detekt/pull/5724) - Use `name` that return name after backticks - [#5719](https://redirect.github.com/detekt/detekt/pull/5719) - UnusedPrivateMember - Fix false positive in case of invoke operator - [#5717](https://redirect.github.com/detekt/detekt/pull/5717) - Fix false positive for `CanBeNonNullable` rule - [#5714](https://redirect.github.com/detekt/detekt/pull/5714) - IgnoredReturnValue: fix false negative when annotation is on the package - [#5706](https://redirect.github.com/detekt/detekt/pull/5706) - Check Thread.sleep for block expression - [#5699](https://redirect.github.com/detekt/detekt/pull/5699) - Fix false positive of in UnnecessaryParentheses - [#5684](https://redirect.github.com/detekt/detekt/pull/5684) - Fix url and kotlin reference support in kdoc - [#5683](https://redirect.github.com/detekt/detekt/pull/5683) - Add config for variable expression in when - [#5681](https://redirect.github.com/detekt/detekt/pull/5681) - Enable NoSemicolons rule - [#5663](https://redirect.github.com/detekt/detekt/pull/5663) - Use correct resolvable/consumable flags on detekt's configurations - [#5657](https://redirect.github.com/detekt/detekt/pull/5657) - Prepare for Gradle 8 - [#5656](https://redirect.github.com/detekt/detekt/pull/5656) - ExplicitCollectionElementAccessMethod rule update - [#5654](https://redirect.github.com/detekt/detekt/pull/5654) - Cast nullable to non nullable type - [#5653](https://redirect.github.com/detekt/detekt/pull/5653) - Enable verbose mode for Codecov GH Action - [#5652](https://redirect.github.com/detekt/detekt/pull/5652) - Fail build when issues found with JVM target compatibility of related compile tasks - [#5651](https://redirect.github.com/detekt/detekt/pull/5651) - Don't silently use Kotlin compiler fallback strategy - [#5650](https://redirect.github.com/detekt/detekt/pull/5650) - Documentation tweaks - [#5639](https://redirect.github.com/detekt/detekt/pull/5639) - Have consistent compile-test-snippets between project and system property - [#5630](https://redirect.github.com/detekt/detekt/pull/5630) - Exclude operator functions in function min/max length - [#5618](https://redirect.github.com/detekt/detekt/pull/5618) - Broken link at EmptyFunctionBlock - [#5604](https://redirect.github.com/detekt/detekt/pull/5604) - Update rule description for errorprone rules - [#5603](https://redirect.github.com/detekt/detekt/pull/5603) - FunctionMaxLength false positive for overridden methods [#5590](https://redirect.github.com/detekt/detekt/issues/5590) - [#5599](https://redirect.github.com/detekt/detekt/pull/5599) - Report proper code position in `MaxLineLength` - [#5583](https://redirect.github.com/detekt/detekt/pull/5583) - Allow access to nonpublic members of public types in java.base/java.lang package - [#5579](https://redirect.github.com/detekt/detekt/pull/5579) - NonBooleanPropertyPrefixedWithIs: Allow AtomicBoolean - [#5577](https://redirect.github.com/detekt/detekt/pull/5577) - Pass compilation output classes to detekt analysis classpath - [#5556](https://redirect.github.com/detekt/detekt/pull/5556) - Fix KDocReferencesNonPublicProperty false positive - [#5534](https://redirect.github.com/detekt/detekt/pull/5534) ##### Dependency Updates - Update dependency io.github.detekt.sarif4k:sarif4k to v0.4.0 - [#6113](https://redirect.github.com/detekt/detekt/pull/6113) - Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.7.1 - [#6097](https://redirect.github.com/detekt/detekt/pull/6097) - Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.7.0 - [#6074](https://redirect.github.com/detekt/detekt/pull/6074) - Update com.android.tools.build - [#6065](https://redirect.github.com/detekt/detekt/pull/6065) - Update JaCoCo to v0.8.10 - [#6044](https://redirect.github.com/detekt/detekt/pull/6044) - Update plugin pluginPublishing to v1.2.0 - [#5975](https://redirect.github.com/detekt/detekt/pull/5975) - Update ktlint to v0.48.1 - [#5661](https://redirect.github.com/detekt/detekt/pull/5661) - Update dependency com.android.tools.build:gradle to v7.4.0 - [#5693](https://redirect.github.com/detekt/detekt/pull/5693) - JaCoCo 0.8.9 - [#5959](https://redirect.github.com/detekt/detekt/pull/5959) - Update dependency com.github.tschuchortdev:kotlin-compile-testing to v1.5.0 - [#5882](https://redirect.github.com/detekt/detekt/pull/5882) - Update dependency org.jetbrains.dokka to v1.8.10 - [#5878](https://redirect.github.com/detekt/detekt/pull/5878) - Compile detekt-compiler-plugin against standard Kotlin compiler artifact - [#5765](https://redirect.github.com/detekt/detekt/pull/5765) - Migrate to SnakeYAML Engine - [#5751](https://redirect.github.com/detekt/detekt/pull/5751) - Update kotlin monorepo to v1.8.10 - [#5745](https://redirect.github.com/detekt/detekt/pull/5745) - Update ktlint to v0.48.0 - [#5625](https://redirect.github.com/detekt/detekt/pull/5625) - Migrate to Gradle Nexus Publish Plugin - [#5554](https://redirect.github.com/detekt/detekt/pull/5554) - Update dependency io.github.detekt.sarif4k:sarif4k to v0.2.0 - [#5496](https://redirect.github.com/detekt/detekt/pull/5496) ##### Housekeeping & Refactorings - Inline Cases enum and inline other external test code into the test classes - [#6107](https://redirect.github.com/detekt/detekt/pull/6107) - Update codecov/codecov-action digest to [`eaaf4be`](https://redirect.github.com/detekt/detekt/commit/eaaf4be) - [#6102](https://redirect.github.com/detekt/detekt/pull/6102) - Remove unnecessary baselines - [#6092](https://redirect.github.com/detekt/detekt/pull/6092) - Remove unused `dependenciesAsNames` - [#6059](https://redirect.github.com/detekt/detekt/pull/6059) - Reduce eager POM task creation - [#6041](https://redirect.github.com/detekt/detekt/pull/6041) - Improve our configuration of `ClassNaming` and `FunctionNaming` - [#6019](https://redirect.github.com/detekt/detekt/pull/6019) - Comment text in the Issue/PR Template - [#5992](https://redirect.github.com/detekt/detekt/pull/5992) - Fix typo: Github -> GitHub - [#5956](https://redirect.github.com/detekt/detekt/pull/5956) - Review all Detekt and Detekt Gradle Plugin usages. - [#5955](https://redirect.github.com/detekt/detekt/pull/5955) - Review all Detekt and Detekt Gradle Plugin usages. - [#5953](https://redirect.github.com/detekt/detekt/pull/5953) - Add a test for catching undocumented public interfaces - [#5951](https://redirect.github.com/detekt/detekt/pull/5951) - Execute tests in parallel - [#5944](https://redirect.github.com/detekt/detekt/pull/5944) - Make GeneratorSpec use resources - [#5932](https://redirect.github.com/detekt/detekt/pull/5932) - Cleanup detekt-formatting to use detekt's own assertThat function - [#5911](https://redirect.github.com/detekt/detekt/pull/5911) - Stale any issue with support tag in one month - [#5904](https://redirect.github.com/detekt/detekt/pull/5904) - Remove instances of double mutability - [#5899](https://redirect.github.com/detekt/detekt/pull/5899) - Handle todo in LinesOfCode logic - [#5897](https://redirect.github.com/detekt/detekt/pull/5897) - Boy scout - `detekt-generator` - [#5854](https://redirect.github.com/detekt/detekt/pull/5854) - Tweak GHA configs a bit - [#5852](https://redirect.github.com/detekt/detekt/pull/5852) - Create `generateWebsite` - [#5849](https://redirect.github.com/detekt/detekt/pull/5849) - Remove dependency between check and jacocoMergedReport - [#5846](https://redirect.github.com/detekt/detekt/pull/5846) - Sort deprecation properties - [#5845](https://redirect.github.com/detekt/detekt/pull/5845) - Simplify generate documentation - [#5844](https://redirect.github.com/detekt/detekt/pull/5844) - Remove unnecessary `@Suppress("ReturnCount")` - [#5841](https://redirect.github.com/detekt/detekt/pull/5841) - Cleaner merging of Gradle blocks for functionalTests - [#5830](https://redirect.github.com/detekt/detekt/pull/5830) - Replace trimMargin usages - [#5827](https://redirect.github.com/detekt/detekt/pull/5827) - Disable PTS from local and enable it for PRs - [#5826](https://redirect.github.com/detekt/detekt/pull/5826) - Activate MultilineRawStringIndentation on detekt - [#5819](https://redirect.github.com/detekt/detekt/pull/5819) - Remove single-use `times` method, use stdlib's `repeat` instead. - [#5774](https://redirect.github.com/detekt/detekt/pull/5774) - Remove redundant build config - [#5617](https://redirect.github.com/detekt/detekt/pull/5617) - Migrate to AGP namespaces - [#5569](https://redirect.github.com/detekt/detekt/pull/5569) - Fix typo - [#5557](https://redirect.github.com/detekt/detekt/pull/5557) ##### Contributors We would like to thank the following contributors that made this release possible: [@3flex](https://redirect.github.com/3flex), [@BeBAKE](https://redirect.github.com/BeBAKE), [@BraisGabin](https://redirect.github.com/BraisGabin), [@Goooler](https://redirect.github.com/Goooler), [@SaumyaBhushan](https://redirect.github.com/SaumyaBhushan), [@TWiStErRob](https://redirect.github.com/TWiStErRob), [@VitalyVPinchuk](https://redirect.github.com/VitalyVPinchuk), [@adef145](https://redirect.github.com/adef145), [@asomov](https://redirect.github.com/asomov), [@atulgpt](https://redirect.github.com/atulgpt), [@chao2zhang](https://redirect.github.com/chao2zhang), [@cketti](https://redirect.github.com/cketti), [@cortinico](https://redirect.github.com/cortinico), [@drawers](https://redirect.github.com/drawers), [@dzirbel](https://redirect.github.com/dzirbel), [@igorwojda](https://redirect.github.com/igorwojda), [@lexa-diky](https://redirect.github.com/lexa-diky), [@luanpotter](https://redirect.github.com/luanpotter), [@marschwar](https://redirect.github.com/marschwar), [@mjovanc](https://redirect.github.com/mjovanc), [@mmorozkov](https://redirect.github.com/mmorozkov), [@ncteisen](https://redirect.github.com/ncteisen), [@osipxd](https://redirect.github.com/osipxd), [@ov7a](https://redirect.github.com/ov7a), [@schalkms](https://redirect.github.com/schalkms), [@t-kameyama](https://redirect.github.com/t-kameyama), [@tresni](https://redirect.github.com/tresni) See all issues at: [1.23.0](https://redirect.github.com/detekt/detekt/milestone/88) ### [`v1.22.0`](https://redirect.github.com/detekt/detekt/releases/tag/v1.22.0) We're extremely excited to announce the next upcoming stable release of Detekt: 1.22.0 🚀 This release is coming with 16 new rules, 2 new rulesets and several new functionalities & APIs. We've also introduced the [**Detekt Marketplace**](https://detekt.dev/marketplace), a place for users to share their 3rd party rules and extensions. We want to take the opportunity to thank [our Sponsors](https://redirect.github.com/sponsors/detekt) and our Contributors for testing, bug reporting and helping us release this new version of Detekt. You're more than welcome to join our community on the [#detekt](https://kotlinlang.slack.com/archives/C88E12QH4) channel on KotlinLang's Slack (you can [get an invite here](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up)). ##### Notable Changes - We're introducing the [**Detekt Marketplace**](https://detekt.dev/marketplace), a place where you can add your own 3rd party extension such as rule, plugins, custom reporter, etc. - [#5191](https://redirect.github.com/detekt/detekt/pull/5191) - Our website is now versioned. You can find the changes for each version using the dropdown menu on the top bar. Documentation for the upcoming version (next) [can be found here](https://detekt.dev/docs/next/intro). - We added **16** new Rules to Detekt - `AlsoCouldBeApply` - [#5333](https://redirect.github.com/detekt/detekt/pull/5333) - `MultilineRawStringIndentation` - [#5058](https://redirect.github.com/detekt/detekt/pull/5058) - `TrimMultilineRawString` - [#5051](https://redirect.github.com/detekt/detekt/pull/5051) - `UnnecessaryNotNullCheck` - [#5218](https://redirect.github.com/detekt/detekt/pull/5218) - `UnnecessaryPartOfBinaryExpression` - [#5203](https://redirect.github.com/detekt/detekt/pull/5203) - `UseSumOfInsteadOfFlatMapSize` - [#5405](https://redirect.github.com/detekt/detekt/pull/5405) - `FunctionReturnTypeSpacing` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256) - `FunctionSignature` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256) - `FunctionStartOfBodySpacing` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256) - `NullableTypeSpacing` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256) - `ParameterListSpacing` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256) - `SpacingBetweenFunctionNameAndOpeningParenthesis` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256) - `TrailingCommaOnCallSite` from KtLint - [#5312](https://redirect.github.com/detekt/detekt/pull/5312) - `TrailingCommaOnDeclarationSite` from KtLint - [#5312](https://redirect.github.com/detekt/detekt/pull/5312) - `TypeParameterListSpacing` from KtLint - [#5256](https://redirect.github.com/detekt/detekt/pull/5256) - We added a new ruleset called `detekt-rules-ruleauthors` containing rules for Rule Authors to enforce best practices on Detekt rules such as the new `ViolatesTypeResolutionRequirements` - [#5129](https://redirect.github.com/detekt/detekt/pull/5129) [#5182](https://redirect.github.com/detekt/detekt/pull/5182) - We added a new ruleset called `detekt-rules-libraries` containing rules mostly useful for Library Authors - We moved the following rules inside `ForbiddenPublicDataClass`, `LibraryCodeMustSpecifyReturnType`, `LibraryEntitiesShouldNotBePublic` this new ruleset - See Migration below on how to migrate [#5360](https://redirect.github.com/detekt/detekt/pull/5360) - We added support for JVM toolchain. This means that Detekt will now respect the JDK toolchain you specify on your Gradle configuration. You will also be able to specify a custom JDK home with the `--jdk-home` CLI parameter - [#5269](https://redirect.github.com/detekt/detekt/pull/5269) - Improvement for Type Resolution - We will now skip rules annotated with `@RequiresTypeResolution` when without Type Resolution - [#5176](https://redirect.github.com/detekt/detekt/pull/5176) - We will warn users if they run rules requiring Type Resolution when Type Resolution is disabled, so they're not silently skipped - [#5226](https://redirect.github.com/detekt/detekt/pull/5226) - Improvement for Config Management - We added exhaustiveness check during config validation. You can enable it `checkExhaustiveness: true` in your config file. This is disabled by default. - [#5089](https://redirect.github.com/detekt/detekt/pull/5089) - We added support for generating custom configuration for rule authors - [#5080](https://redirect.github.com/detekt/detekt/pull/5080) - Deprecations & Removals - We deprecated the MultiRule class as it was overly complicated. The suggested approach is to just provide separated rules. - [#5161](https://redirect.github.com/detekt/detekt/pull/5161) - The `--fail-fast` CLI flag (and `failFast` Gradle property) has been removed. It was deprecated since 1.16.x - [#5290](https://redirect.github.com/detekt/detekt/pull/5290) - We **deprecated** the following rules `DuplicateCaseInWhenExpression`, `MissingWhenCase`, `RedundantElseInWhen` as the Kotlin Compiler is already reporting errors for those scenarios - [#5309](https://redirect.github.com/detekt/detekt/pull/5309) - We removed the `--print-ast` CLI flag as [PsiViewer](https://www.jetbrains.com/help/idea/psi-viewer.html) provides the same features - [#5418](https://redirect.github.com/detekt/detekt/pull/5418) - Notable changes to existing rules - `ArrayPrimitive` is now working only with Type Resolution - [#5175](https://redirect.github.com/detekt/detekt/pull/5175) - `WildcardImport` is now running also on tests by default - [#5121](https://redirect.github.com/detekt/detekt/pull/5121) - `ForbiddenImport` allows now to specify a reason for every forbidden import - [#4909](https://redirect.github.com/detekt/detekt/pull/4909) - `IgnoredReturnValue`: option `restrictToAnnotatedMethods` is now deprecated in favor of `restrictToConfig` - [#4922](https://redirect.github.com/detekt/detekt/pull/4922) - This version of Detekt is built with Gradle `v7.5.1`, AGP `7.3.1`, Kotlin `1.7.21` and KtLint `0.47.1` (see [#5363](https://redirect.github.com/detekt/detekt/pull/5363) [#5189](https://redirect.github.com/detekt/detekt/pull/5189) [#5411](https://redirect.github.com/detekt/detekt/pull/5411) [#5312](https://redirect.github.com/detekt/detekt/pull/5312) [#5519](https://redirect.github.com/detekt/detekt/pull/5519)) - The minimum supported Gradle version is now `v6.7.1` - [#4964](https://redirect.github.com/detekt/detekt/pull/4964) ##### Migration We deprecated a number of rules in this release. You should update your config file as follows: ```diff potential-bugs: active: true ... - DuplicateCaseInWhenExpression: - active: true ... - MissingWhenCase: - active: true - allowElseExpression: true ... - RedundantElseInWhen: - active: true style: active: true ... - ForbiddenPublicDataClass: - active: true - excludes: ['**'] - ignorePackages: - - '*.internal' - - '*.internal.*' ... - LibraryCodeMustSpecifyReturnType: - active: true - excludes: ['**'] ... - LibraryEntitiesShouldNotBePublic: - active: true - excludes: ['**'] ``` If you wish to use the `libraries` ruleset we introduced you should add the following to your config file: ```diff + libraries: + active: true + ForbiddenPublicDataClass: + active: false + LibraryEntitiesShouldNotBePublic: + active: false + LibraryCodeMustSpecifyReturnType: + active: true ``` and add the following to you `build.gradle` file: ```kotlin detektPlugins("io.gitlab.arturbosch.detekt:detekt-rules-libraries:$version") ``` If you're using our KtLint wrapper (i.e. `detekt-formatting`) you should also update your config file as follows: ```diff formatting: active: true ... - TrailingComma: - active: false - autoCorrect: true - allowTrailingComma: false - allowTrailingCommaOnCallSite: false ... + TrailingCommaOnCallSite: + active: false + autoCorrect: true + useTrailingCommaOnCallSite: false + TrailingCommaOnDeclarationSite: + active: false + autoCorrect: true + useTrailingCommaOnDeclarationSite: false ``` ##### Changelog - ReturnCount: correctly count assignment expressions with elvis return as guard clauses - [#5539](https://redirect.github.com/detekt/detekt/pull/5539) - UnnecessaryPartOfBinaryExpression: fix false positive with pair creation - [#5516](https://redirect.github.com/detekt/detekt/pull/5516) - False positive at `UnnecessaryPartOfBinaryExpression` - [#5514](https://redirect.github.com/detekt/detekt/issues/5514) - Update documentation for TrailingComma rules - [#5513](https://redirect.github.com/detekt/detekt/pull/5513) - `TrimMultilineRawString` false-positive on annotation parameters - [#5476](https://redirect.github.com/detekt/detekt/issues/5476) - Detekt 1.22.0-RC1 -> 1.22.0-RC2 breaks UnreachableCode - [#5435](https://redirect.github.com/detekt/detekt/issues/5435) - Detekt 1.22.0-RC1 -> 1.22.0-RC2 breaks ignoreAnnotated - [#5427](https://redirect.github.com/detekt/detekt/issues/5427) - Fix issues introduced by [#5152](https://redirect.github.com/detekt/detekt/issues/5152) - [#5508](https://redirect.github.com/detekt/detekt/pull/5508) - MultilineLambdaItParameter: fix false positive for one-line statements with a lambda argument - [#5505](https://redirect.github.com/detekt/detekt/pull/5505) - UseArrayLiteralsInAnnotations: fix false negative with primitive array factory calls - [#5482](https://redirect.github.com/detekt/detekt/pull/5482) - TrimMultilineRawString: fix false positive when it's expected as constant - [#5480](https://redirect.github.com/detekt/detekt/pull/5480) - Fix false negative `SafeCast` with no braces - [#5479](https://redirect.github.com/detekt/detekt/pull/5479) - Update gradle/wrapper-validation-action digest to [`55e685c`](https://redirect.github.com/detekt/detekt/commit/55e685c) - [#5472](https://redirect.github.com/detekt/detekt/pull/5472) - Grant permission for type resolution Gradle job - [#5470](https://redirect.github.com/detekt/detekt/pull/5470) - Fix ObjectPropertyNaming Rule false positive - [#5466](https://redirect.github.com/detekt/detekt/pull/5466) - Fix LambdaParameterNaming rule false positive - [#5465](https://redirect.github.com/detekt/detekt/pull/5465) - Fix ReturnCount false positive when excludeReturnFromLambda is enabled - [#5459](https://redirect.github.com/detekt/detekt/pull/5459) - CognitiveComplexity: count else/else-if as one complexity - [#5458](https://redirect.github.com/detekt/detekt/pull/5458) - Fix false positive MultilineRawStringIndentation with tab indentation - [#5453](https://redirect.github.com/detekt/detekt/pull/5453) - Don't show the number of issues generating the BindingContext - [#5449](https://redirect.github.com/detekt/detekt/pull/5449) - Make detekt less noisy - [#5448](https://redirect.github.com/detekt/detekt/pull/5448) - New ruleauthors rule forConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Renovate Bot.