Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.21.0
->1.22.0
1.21.0
->1.22.0
1.21.0
->1.22.0
Release Notes
detekt/detekt
v1.22.0
1.22.0 - 2022-11-20
Notable Changes
AlsoCouldBeApply
- #5333MultilineRawStringIndentation
- #5058TrimMultilineRawString
- #5051UnnecessaryNotNullCheck
- #5218UnnecessaryPartOfBinaryExpression
- #5203UseSumOfInsteadOfFlatMapSize
- #5405FunctionReturnTypeSpacing
from KtLint - #5256FunctionSignature
from KtLint - #5256FunctionStartOfBodySpacing
from KtLint - #5256NullableTypeSpacing
from KtLint - #5256ParameterListSpacing
from KtLint - #5256SpacingBetweenFunctionNameAndOpeningParenthesis
from KtLint - #5256TrailingCommaOnCallSite
from KtLint - #5312TrailingCommaOnDeclarationSite
from KtLint - #5312TypeParameterListSpacing
from KtLint - #5256detekt-rules-ruleauthors
containing rules for Rule Authors to enforce best practices on Detekt rules such as the newViolatesTypeResolutionRequirements
- #5129 #5182detekt-rules-libraries
containing rules mostly useful for Library Authors - We moved the following rules insideForbiddenPublicDataClass
,LibraryCodeMustSpecifyReturnType
,LibraryEntitiesShouldNotBePublic
this new ruleset - See Migration below on how to migrate #5360--jdk-home
CLI parameter - #5269@RequiresTypeResolution
when without Type Resolution - #5176checkExhaustiveness: true
in your config file. This is disabled by default. - #5089--fail-fast
CLI flag (andfailFast
Gradle property) has been removed. It was deprecated since 1.16.x - #5290DuplicateCaseInWhenExpression
,MissingWhenCase
,RedundantElseInWhen
as the Kotlin Compiler is already reporting errors for those scenarios - #5309--print-ast
CLI flag as PsiViewer provides the same features - #5418ArrayPrimitive
is now working only with Type Resolution - #5175WildcardImport
is now running also on tests by default - #5121ForbiddenImport
allows now to specify a reason for every forbidden import - #4909IgnoredReturnValue
: optionrestrictToAnnotatedMethods
is now deprecated in favor ofrestrictToConfig
- #4922v7.5.1
, AGP7.3.1
, Kotlin1.7.21
and KtLint0.47.1
(see #5363 #5189 #5411 #5312 #5519)v6.7.1
- #4964Migration
We deprecated a number of rules in this release.
You should update your config file as follows:
If you wish to use the
libraries
ruleset we introduced you should add the following to your config file: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:Changelog
UnnecessaryPartOfBinaryExpression
- #5514TrimMultilineRawString
false-positive on annotation parameters - #5476SafeCast
with no braces - #547955e685c
- #5472TrailingComma
as it's now split in two rules - #5423it
-started expressions - #5376FunctionOnlyReturningConstant>excludedFunctions
- #5120KotlinEnvironmentResolver
- #5275NestedScopeFunctions
- #5274UnnecessaryAbstractClass
issue description to be less verbose - #5224detektGenerateConfig
- #5199ForbiddenMethodCall
- #51952ca79b6
- #5177RedundantExplicitType
add annotation@RequiresTypeResolution
- #5128ExitOutsideMain
ifcontextBinding
is empty - #5127DataClassContainsFunctions>conversionFunctionPrefix
- #5119ReturnCount
- #511813046b6
- #5110ForbiddenMethodCall
- #4910Dependency Updates
Housekeeping & Refactorings
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 these updates again.
This PR has been generated by Mend Renovate. View repository job log here.