dellisd / spatial-k

Spatial K - A set of Kotlin Multiplatform Libraries for working with geospatial data
https://dellisd.github.io/spatial-k
MIT License
67 stars 12 forks source link

Update plugin detekt to v1.22.0 #96

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
io.gitlab.arturbosch.detekt (source) 1.20.0 -> 1.22.0 age adoption passing confidence

Release Notes

detekt/detekt ### [`v1.22.0`](https://togithub.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://togithub.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://togithub.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://togithub.com/detekt/detekt/pull/5333) - `MultilineRawStringIndentation` - [#​5058](https://togithub.com/detekt/detekt/pull/5058) - `TrimMultilineRawString` - [#​5051](https://togithub.com/detekt/detekt/pull/5051) - `UnnecessaryNotNullCheck` - [#​5218](https://togithub.com/detekt/detekt/pull/5218) - `UnnecessaryPartOfBinaryExpression` - [#​5203](https://togithub.com/detekt/detekt/pull/5203) - `UseSumOfInsteadOfFlatMapSize` - [#​5405](https://togithub.com/detekt/detekt/pull/5405) - `FunctionReturnTypeSpacing` from KtLint - [#​5256](https://togithub.com/detekt/detekt/pull/5256) - `FunctionSignature` from KtLint - [#​5256](https://togithub.com/detekt/detekt/pull/5256) - `FunctionStartOfBodySpacing` from KtLint - [#​5256](https://togithub.com/detekt/detekt/pull/5256) - `NullableTypeSpacing` from KtLint - [#​5256](https://togithub.com/detekt/detekt/pull/5256) - `ParameterListSpacing` from KtLint - [#​5256](https://togithub.com/detekt/detekt/pull/5256) - `SpacingBetweenFunctionNameAndOpeningParenthesis` from KtLint - [#​5256](https://togithub.com/detekt/detekt/pull/5256) - `TrailingCommaOnCallSite` from KtLint - [#​5312](https://togithub.com/detekt/detekt/pull/5312) - `TrailingCommaOnDeclarationSite` from KtLint - [#​5312](https://togithub.com/detekt/detekt/pull/5312) - `TypeParameterListSpacing` from KtLint - [#​5256](https://togithub.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://togithub.com/detekt/detekt/pull/5129) [#​5182](https://togithub.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://togithub.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://togithub.com/detekt/detekt/pull/5269) - Improvement for Type Resolution - We will now skip rules annotated with `@RequiresTypeResolution` when without Type Resolution - [#​5176](https://togithub.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://togithub.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://togithub.com/detekt/detekt/pull/5089) - We added support for generating custom configuration for rule authors - [#​5080](https://togithub.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://togithub.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://togithub.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://togithub.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://togithub.com/detekt/detekt/pull/5418) - Notable changes to existing rules - `ArrayPrimitive` is now working only with Type Resolution - [#​5175](https://togithub.com/detekt/detekt/pull/5175) - `WildcardImport` is now running also on tests by default - [#​5121](https://togithub.com/detekt/detekt/pull/5121) - `ForbiddenImport` allows now to specify a reason for every forbidden import - [#​4909](https://togithub.com/detekt/detekt/pull/4909) - `IgnoredReturnValue`: option `restrictToAnnotatedMethods` is now deprecated in favor of `restrictToConfig` - [#​4922](https://togithub.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://togithub.com/detekt/detekt/pull/5363) [#​5189](https://togithub.com/detekt/detekt/pull/5189) [#​5411](https://togithub.com/detekt/detekt/pull/5411) [#​5312](https://togithub.com/detekt/detekt/pull/5312) [#​5519](https://togithub.com/detekt/detekt/pull/5519)) - The minimum supported Gradle version is now `v6.7.1` - [#​4964](https://togithub.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://togithub.com/detekt/detekt/pull/5539) - UnnecessaryPartOfBinaryExpression: fix false positive with pair creation - [#​5516](https://togithub.com/detekt/detekt/pull/5516) - False positive at `UnnecessaryPartOfBinaryExpression` - [#​5514](https://togithub.com/detekt/detekt/issues/5514) - Update documentation for TrailingComma rules - [#​5513](https://togithub.com/detekt/detekt/pull/5513) - `TrimMultilineRawString` false-positive on annotation parameters - [#​5476](https://togithub.com/detekt/detekt/issues/5476) - Detekt 1.22.0-RC1 -> 1.22.0-RC2 breaks UnreachableCode - [#​5435](https://togithub.com/detekt/detekt/issues/5435) - Detekt 1.22.0-RC1 -> 1.22.0-RC2 breaks ignoreAnnotated - [#​5427](https://togithub.com/detekt/detekt/issues/5427) - Fix issues introduced by [#​5152](https://togithub.com/detekt/detekt/issues/5152) - [#​5508](https://togithub.com/detekt/detekt/pull/5508) - MultilineLambdaItParameter: fix false positive for one-line statements with a lambda argument - [#​5505](https://togithub.com/detekt/detekt/pull/5505) - UseArrayLiteralsInAnnotations: fix false negative with primitive array factory calls - [#​5482](https://togithub.com/detekt/detekt/pull/5482) - TrimMultilineRawString: fix false positive when it's expected as constant - [#​5480](https://togithub.com/detekt/detekt/pull/5480) - Fix false negative `SafeCast` with no braces - [#​5479](https://togithub.com/detekt/detekt/pull/5479) - Update gradle/wrapper-validation-action digest to [`55e685c`](https://togithub.com/detekt/detekt/commit/55e685c) - [#​5472](https://togithub.com/detekt/detekt/pull/5472) - Grant permission for type resolution Gradle job - [#​5470](https://togithub.com/detekt/detekt/pull/5470) - Fix ObjectPropertyNaming Rule false positive - [#​5466](https://togithub.com/detekt/detekt/pull/5466) - Fix LambdaParameterNaming rule false positive - [#​5465](https://togithub.com/detekt/detekt/pull/5465) - Fix ReturnCount false positive when excludeReturnFromLambda is enabled - [#​5459](https://togithub.com/detekt/detekt/pull/5459) - CognitiveComplexity: count else/else-if as one complexity - [#​5458](https://togithub.com/detekt/detekt/pull/5458) - Fix false positive MultilineRawStringIndentation with tab indentation - [#​5453](https://togithub.com/detekt/detekt/pull/5453) - Don't show the number of issues generating the BindingContext - [#​5449](https://togithub.com/detekt/detekt/pull/5449) - Make detekt less noisy - [#​5448](https://togithub.com/detekt/detekt/pull/5448) - New ruleauthors rule for Entity.from(x.nameIdentifier ?: x) -> Entity.atName(x) - [#​5444](https://togithub.com/detekt/detekt/pull/5444) - Separating ComplexMethod rule into CyclomaticComplexMethod and CognitiveComplexMethod - [#​5442](https://togithub.com/detekt/detekt/pull/5442) - Improve error reporting for CascadingCallWrapping - [#​5439](https://togithub.com/detekt/detekt/pull/5439) - TrimMultilineRawString: fix false positive with not a raw string - [#​5438](https://togithub.com/detekt/detekt/pull/5438) - BooleanPropertyNaming highlight only the name of the variable - [#​5431](https://togithub.com/detekt/detekt/pull/5431) - Deprecate `TrailingComma` as it's now split in two rules - [#​5423](https://togithub.com/detekt/detekt/pull/5423) - Remove unused constant - [#​5421](https://togithub.com/detekt/detekt/pull/5421) - Report if/else as issue location instead of block - [#​5407](https://togithub.com/detekt/detekt/pull/5407) - Remove some unnecessary suppressions - [#​5400](https://togithub.com/detekt/detekt/pull/5400) - Check FormattingRule is auto-correctable by information provided by ktlint - [#​5398](https://togithub.com/detekt/detekt/pull/5398) - Fix false negative MultilineLambdaItParameter on complex multiline single statement - [#​5397](https://togithub.com/detekt/detekt/pull/5397) - ObjectPropertyNaming: fix false positive with top level properties - [#​5390](https://togithub.com/detekt/detekt/pull/5390) - Remove usage of MPP targets function for JVM-only projects - [#​5383](https://togithub.com/detekt/detekt/pull/5383) - UnnecessaryNotNullCheck: fix false negative with smart casted arguments - [#​5380](https://togithub.com/detekt/detekt/pull/5380) - Add missing overlapping info & fix rules URLs - [#​5378](https://togithub.com/detekt/detekt/pull/5378) - AlsoCouldBeApply: fix false positive when all statements are not `it`-started expressions - [#​5376](https://togithub.com/detekt/detekt/pull/5376) - UnusedPrivateMember: fix false negative with named arguments - [#​5374](https://togithub.com/detekt/detekt/pull/5374) - Change requires type resolution rule warning to debug level to not spam the user console - [#​5353](https://togithub.com/detekt/detekt/pull/5353) - Report UseDataClass findings on class name - [#​5352](https://togithub.com/detekt/detekt/pull/5352) - Report LabeledExpression as the label instead of the whole expression - [#​5351](https://togithub.com/detekt/detekt/pull/5351) - Report CastToNullableType at the cast operator instead of the whole expression - [#​5350](https://togithub.com/detekt/detekt/pull/5350) - Convert previously known string property to list based on default value - [#​5347](https://togithub.com/detekt/detekt/pull/5347) - CastToNullableType: highlights too much - [#​5346](https://togithub.com/detekt/detekt/issues/5346) - UseDataClass flags the whole class body, not just the name - [#​5338](https://togithub.com/detekt/detekt/issues/5338) - CanBeNonNullable: explain why the rule does what it does. - [#​5332](https://togithub.com/detekt/detekt/pull/5332) - Differentiate between correctable and non-correctable KtLint rules - [#​5324](https://togithub.com/detekt/detekt/pull/5324) - ReturnCount 1.22.0 crashes on valid 1.21.0 config property excludedFunctions when using --all-rules cli flag - [#​5323](https://togithub.com/detekt/detekt/issues/5323) - LabeledExpression to highlight only label - [#​5316](https://togithub.com/detekt/detekt/issues/5316) - Use the correct source directory set on JVM - [#​5163](https://togithub.com/detekt/detekt/pull/5163) - Get Android variant compile classpath from compileConfiguration - [#​5152](https://togithub.com/detekt/detekt/pull/5152) - Use list config for `FunctionOnlyReturningConstant>excludedFunctions` - [#​5120](https://togithub.com/detekt/detekt/pull/5120) - MaxLineLength: raw typo and test cleanup - [#​5315](https://togithub.com/detekt/detekt/pull/5315) - EndOfSentenceFormat: fix HTML tag heuristic - [#​5313](https://togithub.com/detekt/detekt/pull/5313) - Fix EndOfSentenceFormat highlight - [#​5311](https://togithub.com/detekt/detekt/pull/5311) - Introduce configFile property on DetektGenerateTask - [#​5308](https://togithub.com/detekt/detekt/pull/5308) - Improve debug suggestion message - [#​5300](https://togithub.com/detekt/detekt/pull/5300) - Fat-Jar version of detekt-generator module - [#​5297](https://togithub.com/detekt/detekt/pull/5297) - Toolchains docs - [#​5293](https://togithub.com/detekt/detekt/pull/5293) - Adopt new AGP dsl - [#​5288](https://togithub.com/detekt/detekt/pull/5288) - NonBooleanPropertyPrefixedWithIs: Allow boolean functions - [#​5285](https://togithub.com/detekt/detekt/pull/5285) - Provide the current classpath inside `KotlinEnvironmentResolver` - [#​5275](https://togithub.com/detekt/detekt/pull/5275) - Fix false-positive on `NestedScopeFunctions` - [#​5274](https://togithub.com/detekt/detekt/pull/5274) - Use convention method to set task property defaults - [#​5272](https://togithub.com/detekt/detekt/pull/5272) - Update docusaurus monorepo to v2.1.0 - [#​5270](https://togithub.com/detekt/detekt/pull/5270) - detektVersionReplace.js plugin is not replacing all \[detekt_version] tags on website - [#​5266](https://togithub.com/detekt/detekt/pull/5266) - Update ktlint rule doc links - [#​5258](https://togithub.com/detekt/detekt/pull/5258) - Remove redundant rule config for rules enabled by default - [#​5257](https://togithub.com/detekt/detekt/pull/5257) - UnusedPrivateMember: fix false positive with backtick parameters - [#​5252](https://togithub.com/detekt/detekt/pull/5252) - Improve MultilineRawStringIndentation - [#​5245](https://togithub.com/detekt/detekt/pull/5245) - UnnecessaryLet: fix false positive with with invoke operator calls - [#​5240](https://togithub.com/detekt/detekt/pull/5240) - Introduce baseline tooling api - [#​5239](https://togithub.com/detekt/detekt/pull/5239) - Allow secondary constructors to reference CoroutineDispatchers - [#​5227](https://togithub.com/detekt/detekt/pull/5227) - Update `UnnecessaryAbstractClass` issue description to be less verbose - [#​5224](https://togithub.com/detekt/detekt/pull/5224) - Update plugin com.gradle.common-custom-user-data-gradle-plugin to v1.8.0 - [#​5223](https://togithub.com/detekt/detekt/pull/5223) - Pin dependencies - [#​5222](https://togithub.com/detekt/detekt/pull/5222) - Remove rule from NamingRules multi rule - [#​5212](https://togithub.com/detekt/detekt/pull/5212) - Run all rules from EmptyBlocks multi rule individually - [#​5208](https://togithub.com/detekt/detekt/pull/5208) - Run all rules from KDocStyle multi rule individually - [#​5207](https://togithub.com/detekt/detekt/pull/5207) - Docs: GitHub - Add link to configure Sarif severity alert level - [#​5206](https://togithub.com/detekt/detekt/pull/5206) - Fix errors with `detektGenerateConfig` - [#​5199](https://togithub.com/detekt/detekt/pull/5199) - Forbid constructors with `ForbiddenMethodCall` - [#​5195](https://togithub.com/detekt/detekt/pull/5195) - Update github/codeql-action digest to [`2ca79b6`](https://togithub.com/detekt/detekt/commit/2ca79b6) - [#​5177](https://togithub.com/detekt/detekt/pull/5177) - Allow to ignore overloaded methods for the complex interface rule ([#​5165](https://togithub.com/detekt/detekt/issues/5165)) - [#​5173](https://togithub.com/detekt/detekt/pull/5173) - Add excludesRawStrings in MaxLineLength - [#​5171](https://togithub.com/detekt/detekt/pull/5171) - Enable Predictive Test Selection for local builds - [#​5170](https://togithub.com/detekt/detekt/pull/5170) - Update dependency org.kohsuke:github-api to v1.307 - [#​5168](https://togithub.com/detekt/detekt/pull/5168) - Update dependency com.github.ajalt:clikt to v2.8.0 - [#​5167](https://togithub.com/detekt/detekt/pull/5167) - Update docusaurus monorepo to v2.0.1 - [#​5166](https://togithub.com/detekt/detekt/pull/5166) - Run build-logic Kotlin compilation out of process on CI - [#​5162](https://togithub.com/detekt/detekt/pull/5162) - Add information about exhaustiveness check to documentation - [#​5160](https://togithub.com/detekt/detekt/pull/5160) - Use getter when determining whether custom config path is set in DetektGenerateConfigTask - [#​5157](https://togithub.com/detekt/detekt/pull/5157) - Limit Kotlin version warning suppression scope in build - [#​5156](https://togithub.com/detekt/detekt/pull/5156) - Re-enable warnings as errors for detekt-gradle-plugin - [#​5155](https://togithub.com/detekt/detekt/pull/5155) - Bundle slf4j-nop in detekt-formatting JAR - [#​5153](https://togithub.com/detekt/detekt/pull/5153) - Fix false negative for UseRequire when thrown in conditional block - [#​5147](https://togithub.com/detekt/detekt/pull/5147) - Allow parentheses for unclear precedence with range operator - [#​5143](https://togithub.com/detekt/detekt/pull/5143) - Mark apiDump task as incompatible with configuration cache - [#​5134](https://togithub.com/detekt/detekt/pull/5134) - Improve binding context management - [#​5130](https://togithub.com/detekt/detekt/pull/5130) - `RedundantExplicitType` add annotation `@RequiresTypeResolution` - [#​5128](https://togithub.com/detekt/detekt/pull/5128) - Disable `ExitOutsideMain` if `contextBinding` is empty - [#​5127](https://togithub.com/detekt/detekt/pull/5127) - Use list config for `DataClassContainsFunctions>conversionFunctionPrefix` - [#​5119](https://togithub.com/detekt/detekt/pull/5119) - Support proper globbing in `ReturnCount` - [#​5118](https://togithub.com/detekt/detekt/pull/5118) - Improve finding message of ExplicitItLambdaParameter - [#​5117](https://togithub.com/detekt/detekt/pull/5117) - Update JamesIves/github-pages-deploy-action digest to [`13046b6`](https://togithub.com/detekt/detekt/commit/13046b6) - [#​5110](https://togithub.com/detekt/detekt/pull/5110) - UnusedUnaryOperator: fix false positive with var assignment and if expression - [#​5106](https://togithub.com/detekt/detekt/pull/5106) - Tag publishPlugins task as incompatible with configuration cache - [#​5101](https://togithub.com/detekt/detekt/pull/5101) - Make verifyGeneratorOutput task configuration cache compatible - [#​5100](https://togithub.com/detekt/detekt/pull/5100) - Remove obsolete FeatureInAlphaState opt in - [#​5099](https://togithub.com/detekt/detekt/pull/5099) - Remove explicit RequiresOptIn compiler flag - [#​5098](https://togithub.com/detekt/detekt/pull/5098) - Use Gradle's configuration cache by default - [#​5095](https://togithub.com/detekt/detekt/pull/5095) - Detect undocumented protected classes, properties, and functions - [#​5083](https://togithub.com/detekt/detekt/pull/5083) - ReturnCount.excludedFunctions should be a List\ - [#​5081](https://togithub.com/detekt/detekt/pull/5081) - Make ForbiddenMethodCall to support property getters/setters and method references - [#​5078](https://togithub.com/detekt/detekt/pull/5078) - Refactor Gradle tasks to use Gradle's managed properties - [#​4966](https://togithub.com/detekt/detekt/pull/4966) - Add option to add a reason to `ForbiddenMethodCall` - [#​4910](https://togithub.com/detekt/detekt/pull/4910) - UnnecessaryParentheses: add options to allow in ambiguous cases - [#​4881](https://togithub.com/detekt/detekt/pull/4881) ##### Dependency Updates - Update dependency com.android.tools.build:gradle to v7.3.1 - [#​5411](https://togithub.com/detekt/detekt/pull/5411) - Update plugin com.gradle.enterprise to v3.11.2 - [#​5406](https://togithub.com/detekt/detekt/pull/5406) - Update dependency org.jetbrains.dokka to v1.7.20 - [#​5401](https://togithub.com/detekt/detekt/pull/5401) - Update dependency org.yaml:snakeyaml to v1.33 - [#​5354](https://togithub.com/detekt/detekt/pull/5354) - Update dependency org.spekframework.spek2:spek-dsl-jvm to v2.0.19 - [#​5237](https://togithub.com/detekt/detekt/pull/5237) - Update dependency com.android.tools.build:gradle to v7.2.2 - [#​5178](https://togithub.com/detekt/detekt/pull/5178) - Update org.jetbrains.kotlinx - [#​5072](https://togithub.com/detekt/detekt/pull/5072) - Update dependency org.jetbrains.dokka to v1.7.10 - [#​5070](https://togithub.com/detekt/detekt/pull/5070) - Bump ktlint to version 0.46.1 - [#​5044](https://togithub.com/detekt/detekt/pull/5044) - AssertJ 3.23.1 - [#​4265](https://togithub.com/detekt/detekt/pull/4265) ##### Housekeeping & Refactorings - Document and test edge cases for ForbiddenMethodCall function signatures - [#​5495](https://togithub.com/detekt/detekt/pull/5495) - Fix invalid syntaxes in test code - [#​5446](https://togithub.com/detekt/detekt/pull/5446) - Improve raw strings format - [#​5244](https://togithub.com/detekt/detekt/pull/5244) - Enable trim multiline raw string - [#​5243](https://togithub.com/detekt/detekt/pull/5243) - Remove old configurations - [#​5198](https://togithub.com/detekt/detekt/pull/5198) - Improve tests in UnnecessaryParenthesesSpec - [#​5197](https://togithub.com/detekt/detekt/pull/5197) - Remove multi rule FileParsingRule - [#​5193](https://togithub.com/detekt/detekt/pull/5193) - Remove unused dry run properties from baseline/config tasks - [#​5158](https://togithub.com/detekt/detekt/pull/5158) - remove SimpleGlob in favor of String.simplePatternToRegex() - [#​5144](https://togithub.com/detekt/detekt/pull/5144) - Remove unused property - [#​5135](https://togithub.com/detekt/detekt/pull/5135) - Assert end source locations - [#​5116](https://togithub.com/detekt/detekt/pull/5116) - Forbid usage of DiagnosticUtils.getLineAndColumnInPsiFile - [#​5109](https://togithub.com/detekt/detekt/pull/5109) - Configure 'ForbiddenImport' to use value and reason - [#​5105](https://togithub.com/detekt/detekt/pull/5105) - Enable Kotlin's new approach to incremental compilation - [#​5092](https://togithub.com/detekt/detekt/pull/5092) - Fix current indentation - [#​5059](https://togithub.com/detekt/detekt/pull/5059) See all issues at: [1.22.0](https://togithub.com/detekt/detekt/milestone/87) ### [`v1.21.0`](https://togithub.com/detekt/detekt/releases/tag/v1.21.0) We're delighted to announce the next upcoming stable release of Detekt: `1.21.0` πŸŽ‰ This release is coming with 6 new rules, new API and functionalities and several stability improvements. We want to thank you very much [our Sponsors](https://togithub.com/sponsors/detekt) for the support in those last months. The work behind Detekt is all happening on a voluntary basis, and we're more than grateful for all the support we get from the Open Source Ecosystem. We're also excited to announce that we're now having an [Open Source Gradle Enterprise](https://ge.detekt.dev) instance. When building the Detekt projects, you'll benefit from the Gradle Remote Cache that this instance is providing! Finally, we want to take the opportunity to thank 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 enabled ~30 new rules by default which we believe are now stable enough. - [#​4875](https://togithub.com/detekt/detekt/pull/4875) - We added **7** new Rules to Detekt - `NullableBooleanCheck` - [#​4872](https://togithub.com/detekt/detekt/pull/4872) - `CouldBeSequence` - [#​4855](https://togithub.com/detekt/detekt/pull/4855) - `UnnecessaryBackticks` - [#​4764](https://togithub.com/detekt/detekt/pull/4764) - `ForbiddenSuppress` - [#​4899](https://togithub.com/detekt/detekt/pull/4899) - `MaxChainedCallsOnSameLine` - [#​4985](https://togithub.com/detekt/detekt/pull/4985) - `CascadingCallWrapping` - [#​4979](https://togithub.com/detekt/detekt/pull/4979) - `NestedScopeFunctions` - [#​4788](https://togithub.com/detekt/detekt/pull/4788) - We added support for Markdown reports - [#​4858](https://togithub.com/detekt/detekt/pull/4858) - We now allow users and rule authors to specify a **reason** for every value in the config file - [#​4611](https://togithub.com/detekt/detekt/pull/4611) - Please note that this feature requires a rule to be extended to support it. If you're a rule author you can start using it right away in your rule. We're looking into using this feature in some first party rule starting from Detekt `1.22.0`. - We now report as warnings the Strings in the config file that can be converted to be an array - [#​4793](https://togithub.com/detekt/detekt/pull/4793) - We added a dependency on **ConTester** to help us verify concurrency scenarios for Detekt - [#​4672](https://togithub.com/detekt/detekt/pull/4672) - For contributors: we restructured our build setup to be use **Gradle composite build** - [#​4751](https://togithub.com/detekt/detekt/pull/4751) ##### Migration We fixed a bug related to function with KDocs and how their location in the source code was calculated (see [#​4961](https://togithub.com/detekt/detekt/pull/4961) and [#​4887](https://togithub.com/detekt/detekt/issues/4887)). Because of this, some users might have to **recreate their baseline** as the location of such functions are not matched anymore against the baseline. You can do so by deleting your old baseline and invoking the `detektBaseline` task (or the corresponding task, based on your configuration). ##### Changelog - ReturnCount: Make configuration parameter more explicit - [#​5062](https://togithub.com/detekt/detekt/pull/5062) - Remove redundant null check - [#​5061](https://togithub.com/detekt/detekt/pull/5061) - Drop redundant Gradle workaround - [#​5057](https://togithub.com/detekt/detekt/pull/5057) - Update ktlint links from website to readme - [#​5056](https://togithub.com/detekt/detekt/pull/5056) - Improve extensions.doc format with admonitions - [#​5055](https://togithub.com/detekt/detekt/pull/5055) - Update docusaurus monorepo to v2.0.0-beta.22 - [#​5050](https://togithub.com/detekt/detekt/pull/5050) - Enable strict Kotlin DSL precompiled script plugins accessors generation - [#​5048](https://togithub.com/detekt/detekt/pull/5048) - MaxChainedCallsOnSameLine: don't count package references as chained calls - [#​5036](https://togithub.com/detekt/detekt/pull/5036) - Xml Report Merger now merges duplicate smells across input report files - [#​5033](https://togithub.com/detekt/detekt/pull/5033) - Add ending line and column to Location.kt - [#​5032](https://togithub.com/detekt/detekt/pull/5032) - Fix type resolution link in Contributing.md - [#​5027](https://togithub.com/detekt/detekt/pull/5027) - [#​5014](https://togithub.com/detekt/detekt/issues/5014) Fix MaxChainedCallsOnSameLine false positives - [#​5020](https://togithub.com/detekt/detekt/pull/5020) - Add endColumn/endLine to SARIF region - [#​5011](https://togithub.com/detekt/detekt/pull/5011) - Removed UnnecessaryAbstractClass if it inherits from a abstract class - [#​5009](https://togithub.com/detekt/detekt/pull/5009) - Only recommend using index accessors for Java classes that are known collections - [#​4994](https://togithub.com/detekt/detekt/pull/4994) - UnusedImports: fix false positive for unresolved imports - [#​4882](https://togithub.com/detekt/detekt/pull/4882) - Fix Signatures.kt:buildFunctionSignature - [#​4961](https://togithub.com/detekt/detekt/pull/4961) - Loading a specific resource from a module must use class from module - [#​5008](https://togithub.com/detekt/detekt/pull/5008) - Update github/codeql-action digest to [`3f62b75`](https://togithub.com/detekt/detekt/commit/3f62b75) - [#​5007](https://togithub.com/detekt/detekt/pull/5007) - Show finding at declaration name instead of the whole declaration - [#​5003](https://togithub.com/detekt/detekt/pull/5003) - NamedArguments: don't count trailing lambda argument - [#​5002](https://togithub.com/detekt/detekt/pull/5002) - Address TextLocation for Wrapping - [#​4998](https://togithub.com/detekt/detekt/pull/4998) - Support markdown report in Gradle plugin - [#​4995](https://togithub.com/detekt/detekt/pull/4995) - Fix false-negative for CanBeNonNullable - [#​4993](https://togithub.com/detekt/detekt/pull/4993) - Give a better error message for --jvm-target - [#​4978](https://togithub.com/detekt/detekt/pull/4978) - Fix rule code samples to be valid Kotlin code - [#​4969](https://togithub.com/detekt/detekt/pull/4969) - Use plain ASCII output in standard reports - [#​4968](https://togithub.com/detekt/detekt/pull/4968) - UnnecessaryApply: fix false negative for assignment - [#​4948](https://togithub.com/detekt/detekt/pull/4948) - Support disabling config validation via tooling spec - [#​4937](https://togithub.com/detekt/detekt/pull/4937) - UnusedPrivateMember: highlight declaration name - [#​4928](https://togithub.com/detekt/detekt/pull/4928) - Provide a priority field for DetektProvider - [#​4923](https://togithub.com/detekt/detekt/pull/4923) - CastToNullableType: allow casting null keyword - [#​4907](https://togithub.com/detekt/detekt/pull/4907) - Update plugin com.gradle.common-custom-user-data-gradle-plugin to v1.7.2 - [#​4897](https://togithub.com/detekt/detekt/pull/4897) - Set strict dependency on tested Kotlin compiler version - [#​4822](https://togithub.com/detekt/detekt/pull/4822) - Simplify regular expressions - [#​4893](https://togithub.com/detekt/detekt/pull/4893) - Remove redundant character escape in RegExp - [#​4892](https://togithub.com/detekt/detekt/pull/4892) - Reformat Markdown files to comply with the spec - [#​4891](https://togithub.com/detekt/detekt/pull/4891) - UnnecessaryInnerClass: fix false negative with `this` references - [#​4884](https://togithub.com/detekt/detekt/pull/4884) - UselessCallOnNotNull: fix false positive for unresolved types - [#​4880](https://togithub.com/detekt/detekt/pull/4880) - Update MagicNumber rule to exclude .kts files - [#​4877](https://togithub.com/detekt/detekt/pull/4877) - CanBeNonNullable: fix false positives for parameterized types - [#​4870](https://togithub.com/detekt/detekt/pull/4870) - UnnecessaryInnerClass: fix false positives labeled expression to outer class - [#​4865](https://togithub.com/detekt/detekt/pull/4865) - UnnecessaryInnerClass: add test for safe qualified expressions - [#​4864](https://togithub.com/detekt/detekt/pull/4864) - Fix a confusing Regex in the Compose webpage - [#​4852](https://togithub.com/detekt/detekt/pull/4852) - Fix edit URLs for the website - [#​4850](https://togithub.com/detekt/detekt/pull/4850) - detektGenerateConfig adds the configuration of plugins - [#​4844](https://togithub.com/detekt/detekt/pull/4844) - Update dependency prism-react-renderer to v1.3.3 - [#​4833](https://togithub.com/detekt/detekt/pull/4833) - Search in all versions.properties, not just the first one [#​4830](https://togithub.com/detekt/detekt/issues/4830) - [#​4831](https://togithub.com/detekt/detekt/pull/4831) - Improve exception message - [#​4823](https://togithub.com/detekt/detekt/pull/4823) - Fix ValShouldBeVar false positive inside unknown type - [#​4820](https://togithub.com/detekt/detekt/pull/4820) - Add a recent conference talk link - [#​4819](https://togithub.com/detekt/detekt/pull/4819) - False positive for unused imports [#​4815](https://togithub.com/detekt/detekt/issues/4815) - [#​4818](https://togithub.com/detekt/detekt/pull/4818) - Revert "Display dynamic --jvm-target values when using --help flag ([#​4694](https://togithub.com/detekt/detekt/issues/4694))" - [#​4816](https://togithub.com/detekt/detekt/pull/4816) - UnnecessaryAbstractClass: report only the class name - [#​4808](https://togithub.com/detekt/detekt/pull/4808) - Fix wrong replacement suggestion for UnnecessaryFilter - [#​4807](https://togithub.com/detekt/detekt/pull/4807) - UseOrEmpty: fix false positive for indexing operator calls with type parameters - [#​4804](https://togithub.com/detekt/detekt/pull/4804) - ExplicitCollectionElementAccessMethod: fix false positive for get operators with type parameters - [#​4803](https://togithub.com/detekt/detekt/pull/4803) - Add tests for [#​4786](https://togithub.com/detekt/detekt/issues/4786) - [#​4801](https://togithub.com/detekt/detekt/pull/4801) - Add documentation link for rules in html report - [#​4799](https://togithub.com/detekt/detekt/pull/4799) - Improve rule documentaion and smell message of NamedArguments - [#​4796](https://togithub.com/detekt/detekt/pull/4796) - Improve issue description and smell message of DestructuringDeclarationWithTooManyEntries - [#​4795](https://togithub.com/detekt/detekt/pull/4795) - NestedScopeFunctions - Add rule for nested scope functions - [#​4788](https://togithub.com/detekt/detekt/pull/4788) - Partially drop redundant usage of "dry run" in Gradle plugin tests - [#​4776](https://togithub.com/detekt/detekt/pull/4776) - Allow additionalJavaSourceRootPaths to be defined on [@​KotlinCoreEnvironmentTest](https://togithub.com/KotlinCoreEnvironmentTest) - [#​4771](https://togithub.com/detekt/detekt/pull/4771) - Report KDoc comments that refer to non-public properties of a class - [#​4768](https://togithub.com/detekt/detekt/pull/4768) - Self-inspect the detekt-gradle-plugin - [#​4765](https://togithub.com/detekt/detekt/pull/4765) - Pass args to DetektInvoker as List\ - [#​4762](https://togithub.com/detekt/detekt/pull/4762) - Cleanup Gradle Plugin Publications - [#​4752](https://togithub.com/detekt/detekt/pull/4752) - Break a dependency between `detekt-gradle-plugin` and `detekt-utils` - [#​4748](https://togithub.com/detekt/detekt/pull/4748) - Remove suspend lambda rule with CoroutineScope receiver due to not de… - [#​4747](https://togithub.com/detekt/detekt/pull/4747) - `VarCouldBeVal`: Add configuration flag `ignoreLateinitVar` - [#​4745](https://togithub.com/detekt/detekt/pull/4745) - UnnecessaryInnerClass: fix false positive with references to function type variables - [#​4738](https://togithub.com/detekt/detekt/pull/4738) - Fix false positive on VarCouldBeVal in generic classes - [#​4733](https://togithub.com/detekt/detekt/pull/4733) - OutdatedDocumentation: fix false positive with no primary constructor - [#​4728](https://togithub.com/detekt/detekt/pull/4728) - Android Gradle: add javac intermediates to classpath - [#​4723](https://togithub.com/detekt/detekt/pull/4723) - OptionalWhenBraces: fix false negative when the single statement has comments inside - [#​4722](https://togithub.com/detekt/detekt/pull/4722) - Document pre-commit hook for staged files - [#​4711](https://togithub.com/detekt/detekt/pull/4711) - Enable rules by default for `1.21` - [#​4643](https://togithub.com/detekt/detekt/issues/4643) ##### Dependency Updates - Update dependency gradle to v7.5 - [#​5074](https://togithub.com/detekt/detekt/pull/5074) - Update plugin binaryCompatibilityValidator to v0.11.0 - [#​5069](https://togithub.com/detekt/detekt/pull/5069) - Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.6.3 - [#​4976](https://togithub.com/detekt/detekt/pull/4976) - Update dependency org.jetbrains.dokka to v1.7.0 - [#​4974](https://togithub.com/detekt/detekt/pull/4974) - Update plugin binaryCompatibilityValidator to v0.10.1 - [#​4954](https://togithub.com/detekt/detekt/pull/4954) - Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.6.2 - [#​4868](https://togithub.com/detekt/detekt/pull/4868) - Update dependency com.android.tools.build:gradle to v7.2.1 - [#​4861](https://togithub.com/detekt/detekt/pull/4861) - Update plugin binaryCompatibilityValidator to v0.10.0 - [#​4837](https://togithub.com/detekt/detekt/pull/4837) - Update dependency io.mockk:mockk to v1.12.4 - [#​4829](https://togithub.com/detekt/detekt/pull/4829) - Update dependency com.android.tools.build:gradle to v7.2.0 - [#​4824](https://togithub.com/detekt/detekt/pull/4824) - Add dependency-analysis plugin and implement some recommendations - [#​4798](https://togithub.com/detekt/detekt/pull/4798) - Add dependency on slf4j-nop to silence warning - [#​4775](https://togithub.com/detekt/detekt/pull/4775) - Update plugin dokka to v1.6.21 - [#​4770](https://togithub.com/detekt/detekt/pull/4770) - Update org.jetbrains.kotlin to v1.6.21 - [#​4737](https://togithub.com/detekt/detekt/pull/4737) - Update dependency com.github.breadmoirai:github-release to v2.3.7 - [#​4734](https://togithub.com/detekt/detekt/pull/4734) - Update plugin binaryCompatibilityValidator to v0.9.0 - [#​4729](https://togithub.com/detekt/detekt/pull/4729) ##### Housekeeping & Refactorings - Fix `ComplexMethod` debt and refactor code - [#​5029](https://togithub.com/detekt/detekt/pull/5029) - Fix ReturnCount debt and refactor code - [#​5026](https://togithub.com/detekt/detekt/pull/5026) - Add test for ForbiddenMethodCall with getters - [#​5018](https://togithub.com/detekt/detekt/pull/5018) - Measure flakyness on Windows CI - [#​4742](https://togithub.com/detekt/detekt/pull/4742) - Declare nested test classes as non-static - [#​4894](https://togithub.com/detekt/detekt/pull/4894) - Remove deprecated usages in gradle-plugin test - [#​4889](https://togithub.com/detekt/detekt/pull/4889) - Remove reference to contributor list - [#​4871](https://togithub.com/detekt/detekt/pull/4871) - Add missing image - [#​4834](https://togithub.com/detekt/detekt/pull/4834) - Upgrade to GE enterprise 3.10 - [#​4802](https://togithub.com/detekt/detekt/pull/4802) - Fix broken snapshot publishing - [#​4783](https://togithub.com/detekt/detekt/pull/4783) - Remove pending Gradle version milestones from comments - [#​4777](https://togithub.com/detekt/detekt/pull/4777) - Add more tests for Annotation Suppressor - [#​4774](https://togithub.com/detekt/detekt/pull/4774) - fix: add test case that fails if environment is not properly set up - [#​4769](https://togithub.com/detekt/detekt/pull/4769) - Disable UnusedImports for the Detekt project - [#​4741](https://togithub.com/detekt/detekt/pull/4741) - Remove Unnecesary [@​Nested](https://togithub.com/Nested) - [#​4740](https://togithub.com/detekt/detekt/pull/4740) - Update the argsfile to unblock `runWithArgsFile` failing locally - [#​4718](https://togithub.com/detekt/detekt/pull/4718) See all issues at: [1.21.0](https://togithub.com/detekt/detekt/milestone/86)

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 this update again.



This PR has been generated by Mend Renovate. View repository job log here.

renovate[bot] commented 1 year ago

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above.

⚠ Warning: custom changes will be lost.