Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency io.gitlab.arturbosch.detekt to v1.22.0-RC2 #221

Closed
wants to merge 1 commit into from

Conversation

slack-oss-bot
Copy link
Collaborator

This PR contains the following updates:

Package Type Update Change
io.gitlab.arturbosch.detekt (source) plugin patch 1.22.0-RC1 -> 1.22.0-RC2

Release Notes

detekt/detekt

v1.22.0-RC2

1.22.0-RC2 - 2022-10-16
Notable Changes
  • We're introducing the Detekt Marketplace, a place where you can add your own 3rd party extension such as rule, plugins, custom reporter, etc. - #​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.
  • We added 16 new Rules to Detekt
    • AlsoCouldBeApply - #​5333
    • MultilineRawStringIndentation - #​5058
    • TrimMultilineRawString - #​5051
    • UnnecessaryNotNullCheck - #​5218
    • UnnecessaryPartOfBinaryExpression - #​5203
    • UseSumOfInsteadOfFlatMapSize - #​5405
    • FunctionReturnTypeSpacing from KtLint - #​5256
    • FunctionSignature from KtLint - #​5256
    • FunctionStartOfBodySpacing from KtLint - #​5256
    • NullableTypeSpacing from KtLint - #​5256
    • ParameterListSpacing from KtLint - #​5256
    • SpacingBetweenFunctionNameAndOpeningParenthesis from KtLint - #​5256
    • TrailingCommaOnCallSite from KtLint - #​5312
    • TrailingCommaOnDeclarationSite from KtLint - #​5312
    • TypeParameterListSpacing from KtLint - #​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 #​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
  • 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
  • Improvement for Type Resolution
    • We will now skip rules annotated with @RequiresTypeResolution when without Type Resolution - #​5176
    • We will warn users if they run rules requiring Type Resolution when Type Resolution is disabled, so they're not silently skipped - #​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
    • We added support for generating custom configuration for rule authors - #​5080
  • Deprecations & Removals
    • We deprecated the MultiRule class as it was overly complicated. The suggested approach is to just provide separated rules. - #​5161
    • The --fail-fast CLI flag (and failFast Gradle property) has been removed. It was deprecated since 1.16.x - #​5290
    • We deprecated the following rules DuplicateCaseInWhenExpression, MissingWhenCase, RedundantElseInWhen as the Kotlin Compiler is already reporting errors for those scenarios - #​5309
  • Notable changes to existing rules
    • ArrayPrimitive is now working only with Type Resolution - #​5175
    • WildcardImport is now running also on tests by default - #​5121
    • ForbiddenImport allows now to specify a reason for every forbidden import - #​4909
    • IgnoredReturnValue: option restrictToAnnotatedMethods is now deprecated in favor of restrictToConfig - #​4922
  • This version of Detekt is built with Gradle v7.5.1, AGP 7.3.1, Kotlin 1.7.20 and KtLint 0.47.1 (see #​5363 #​5189 #​5411 #​5312
  • The minimum supported Gradle version is now v6.7.1 - #​4964
Migration

We deprecated a number of rules in this release.

You should update your config file as follows:

  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:

+ libraries:
+   active: true
+   ForbiddenPublicDataClass:
+     active: false
+   LibraryEntitiesShouldNotBePublic:
+     active: false
+   LibraryCodeMustSpecifyReturnType:
+     active: true

and add the following to you build.gradle file:

detektPlugins("io.gitlab.arturbosch.detekt:detekt-rules-authors:$version")

If you're using our KtLint wrapper (i.e. detekt-formatting) you should also update your config file as follows:

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
  • Remove unused constant - #​5421
  • Report if/else as issue location instead of block - #​5407
  • Remove some unnecessary suppressions - #​5400
  • Check FormattingRule is auto-correctable by information provided by ktlint - #​5398
  • Fix false negative MultilineLambdaItParameter on complex multiline single statement - #​5397
  • ObjectPropertyNaming: fix false positive with top level properties - #​5390
  • Remove usage of MPP targets function for JVM-only projects - #​5383
  • UnnecessaryNotNullCheck: fix false negative with smart casted arguments - #​5380
  • Add missing overlapping info & fix rules URLs - #​5378
  • AlsoCouldBeApply: fix false positive when all statements are not it-started expressions - #​5376
  • UnusedPrivateMember: fix false negative with named arguments - #​5374
  • Change requires type resolution rule warning to debug level to not spam the user console - #​5353
  • Report UseDataClass findings on class name - #​5352
  • Report LabeledExpression as the label instead of the whole expression - #​5351
  • Report CastToNullableType at the cast operator instead of the whole expression - #​5350
  • Convert previously known string property to list based on default value - #​5347
  • CastToNullableType: highlights too much - #​5346
  • UseDataClass flags the whole class body, not just the name - #​5338
  • CanBeNonNullable: explain why the rule does what it does. - #​5332
  • Differentiate between correctable and non-correctable KtLint rules - #​5324
  • ReturnCount 1.22.0 crashes on valid 1.21.0 config property excludedFunctions when using --all-rules cli flag - #​5323
  • LabeledExpression to highlight only label - #​5316
  • Use the correct source directory set on JVM - #​5163
  • Get Android variant compile classpath from compileConfiguration - #​5152
  • Use list config for FunctionOnlyReturningConstant>excludedFunctions - #​5120
  • MaxLineLength: raw typo and test cleanup - #​5315
  • EndOfSentenceFormat: fix HTML tag heuristic - #​5313
  • Fix EndOfSentenceFormat highlight - #​5311
  • Introduce configFile property on DetektGenerateTask - #​5308
  • Improve debug suggestion message - #​5300
  • Fat-Jar version of detekt-generator module - #​5297
  • Toolchains docs - #​5293
  • Adopt new AGP dsl - #​5288
  • NonBooleanPropertyPrefixedWithIs: Allow boolean functions - #​5285
  • Provide the current classpath inside KotlinEnvironmentResolver - #​5275
  • Fix false-positive on NestedScopeFunctions - #​5274
  • Use convention method to set task property defaults - #​5272
  • Update docusaurus monorepo to v2.1.0 - #​5270
  • detektVersionReplace.js plugin is not replacing all [detekt_version] tags on website - #​5266
  • Update ktlint rule doc links - #​5258
  • Remove redundant rule config for rules enabled by default - #​5257
  • UnusedPrivateMember: fix false positive with backtick parameters - #​5252
  • Improve MultilineRawStringIndentation - #​5245
  • UnnecessaryLet: fix false positive with with invoke operator calls - #​5240
  • Introduce baseline tooling api - #​5239
  • Allow secondary constructors to reference CoroutineDispatchers - #​5227
  • Update UnnecessaryAbstractClass issue description to be less verbose - #​5224
  • Update plugin com.gradle.common-custom-user-data-gradle-plugin to v1.8.0 - #​5223
  • Pin dependencies - #​5222
  • Remove rule from NamingRules multi rule - #​5212
  • Run all rules from EmptyBlocks multi rule individually - #​5208
  • Run all rules from KDocStyle multi rule individually - #​5207
  • Docs: GitHub - Add link to configure Sarif severity alert level - #​5206
  • Fix errors with detektGenerateConfig - #​5199
  • Forbid constructors with ForbiddenMethodCall - #​5195
  • Update github/codeql-action digest to 2ca79b6 - #​5177
  • Allow to ignore overloaded methods for the complex interface rule (#​5165) - #​5173
  • Add excludesRawStrings in MaxLineLength - #​5171
  • Enable Predictive Test Selection for local builds - #​5170
  • Update dependency org.kohsuke:github-api to v1.307 - #​5168
  • Update dependency com.github.ajalt:clikt to v2.8.0 - #​5167
  • Update docusaurus monorepo to v2.0.1 - #​5166
  • Run build-logic Kotlin compilation out of process on CI - #​5162
  • Add information about exhaustiveness check to documentation - #​5160
  • Use getter when determining whether custom config path is set in DetektGenerateConfigTask - #​5157
  • Limit Kotlin version warning suppression scope in build - #​5156
  • Re-enable warnings as errors for detekt-gradle-plugin - #​5155
  • Bundle slf4j-nop in detekt-formatting JAR - #​5153
  • Fix false negative for UseRequire when thrown in conditional block - #​5147
  • Allow parentheses for unclear precedence with range operator - #​5143
  • Mark apiDump task as incompatible with configuration cache - #​5134
  • Improve binding context management - #​5130
  • RedundantExplicitType add annotation @RequiresTypeResolution - #​5128
  • Disable ExitOutsideMain if contextBinding is empty - #​5127
  • Use list config for DataClassContainsFunctions>conversionFunctionPrefix - #​5119
  • Support proper globbing in ReturnCount - #​5118
  • Improve finding message of ExplicitItLambdaParameter - #​5117
  • Update JamesIves/github-pages-deploy-action digest to 13046b6 - #​5110
  • UnusedUnaryOperator: fix false positive with var assignment and if expression - #​5106
  • Tag publishPlugins task as incompatible with configuration cache - #​5101
  • Make verifyGeneratorOutput task configuration cache compatible - #​5100
  • Remove obsolete FeatureInAlphaState opt in - #​5099
  • Remove explicit RequiresOptIn compiler flag - #​5098
  • Use Gradle's configuration cache by default - #​5095
  • Detect undocumented protected classes, properties, and functions - #​5083
  • ReturnCount.excludedFunctions should be a List<String> - #​5081
  • Make ForbiddenMethodCall to support property getters/setters and method references - #​5078
  • Refactor Gradle tasks to use Gradle's managed properties - #​4966
  • Add option to add a reason to ForbiddenMethodCall - #​4910
  • UnnecessaryParentheses: add options to allow in ambiguous cases - #​4881
Dependency Updates
  • Update dependency com.android.tools.build:gradle to v7.3.1 - #​5411
  • Update plugin com.gradle.enterprise to v3.11.2 - #​5406
  • Update dependency org.jetbrains.dokka to v1.7.20 - #​5401
  • Update dependency org.yaml:snakeyaml to v1.33 - #​5354
  • Update dependency org.spekframework.spek2:spek-dsl-jvm to v2.0.19 - #​5237
  • Update dependency com.android.tools.build:gradle to v7.2.2 - #​5178
  • Update org.jetbrains.kotlinx - #​5072
  • Update dependency org.jetbrains.dokka to v1.7.10 - #​5070
  • Bump ktlint to version 0.46.1 - #​5044
  • AssertJ 3.23.1 - #​4265
Housekeeping & Refactorings
  • Improve raw strings format - #​5244
  • Enable trim multiline raw string - #​5243
  • Remove old configurations - #​5198
  • Improve tests in UnnecessaryParenthesesSpec - #​5197
  • Remove multi rule FileParsingRule - #​5193
  • Remove unused dry run properties from baseline/config tasks - #​5158
  • remove SimpleGlob in favor of String.simplePatternToRegex() - #​5144
  • Remove unused property - #​5135
  • Assert end source locations - #​5116
  • Forbid usage of DiagnosticUtils.getLineAndColumnInPsiFile - #​5109
  • Configure 'ForbiddenImport' to use value and reason - #​5105
  • Enable Kotlin's new approach to incremental compilation - #​5092
  • Fix current indentation - #​5059

See all issues at: 1.22.0


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.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

@ZacSweers
Copy link
Collaborator

Big regression: detekt/detekt#5427

@ZacSweers ZacSweers closed this Oct 18, 2022
@ZacSweers ZacSweers deleted the test-renovate/detekt branch October 18, 2022 18:14
@slack-oss-bot
Copy link
Collaborator Author

Renovate Ignore Notification

As this PR has been closed unmerged, Renovate will now ignore this update (1.22.0-RC2). You will still receive a PR once a newer version is released, so if you wish to permanently ignore this dependency, please add it to the ignoreDeps array of your renovate config.

If this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants