This repository has been archived by the owner on Jun 2, 2023. It is now read-only.
fix(deps): update dependency io.gitlab.arturbosch.detekt:detekt-formatting to v1.23.0 #143
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.20.0
->1.23.0
Release Notes
detekt/detekt
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.
This release also marks the beginning of development of 2.x from the main branch! You can follow the progress here
We want to take the opportunity to thank our Sponsors 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 channel on KotlinLang's Slack (you can get an invite here).
Notable Changes
detekt-compiler-plugin
. The Detekt Compiler plugin 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 - #β5492BracesOnIfStatements
- #β5700BracesOnWhenStatements
- #β5838CastNullableToNonNullableType
- #β5653DoubleNegativeLambda
- #β5937ForbiddenAnnotation
- #β5515PropertyUsedBeforeDeclaration
- #β6062StringShouldBeRawString
- #β5705SuspendFunSwallowedCancellation
- #β5666UnusedParameter
- #β5722UnusedPrivateProperty
- #β5722UseLet
- #β6091UnnecessaryBracesAroundTrailingLambda
- #β6029detekt-formatting
ruleset:ClassName
- #β6037EnumWrapping
- #β6028FunctionName
- #β6037IfElseBracing
- #β6028IfElseWrapping
- #β6028MultilineExpressionWrapping
- #β6028NoBlankLineInList
- #β6028NoConsecutiveComments
- #β6028NoEmptyFirstLineInClassBody
- #β6028NoSingleLineBlockCommentRule
- #β6104ParameterWrapping
- #β6028PropertyName
- #β6037PropertyWrapping
- #β6028StringTemplateIndent
- #β6028TryCatchFinallySpacing
- #β6028UnnecessaryAbstractClass
now only runs with type resolution - #β5829UnusedPrivateMember
has been refactored with some of its logic moved toUnusedParameter
andUnusedPrivateProperty
- #β5722ignoreOverridden
config fromBooleanPropertyNaming
,ConstructorParameterNaming
,FunctionNaming
,VariableNaming
andFunctionParameterNaming
as not useful for those rules - #β5718ignoredSubjectTypes
to ruleElseCaseInsteadOfExhaustiveWhen
to specify types that should be ignored by the rule (#β5623) - #β5634allowOperators
to ruleDataClassContainsFunctions
- #β5658MandatoryBracesIfStatements
has been removed in favor ofBracesOnIfStatements
- #β5700ignoreWhenContainingVariableDeclaration
toUseIfInsteadOfWhen
to ignore captured variables - #β5681detekt-formatting
ruleset now accepts anindentSize
parameter (see the full list here).detekt-formatting
ruleset are now turned on by default (see the full list here).includes
/excludes
logic on the config file as they were overriding each other - #β5782detekt-test-utils
. The recommended testing framework is JUnit - #β5785v6.8.3
- #β5616v8.1
, AGP8.0.1
, Kotlin1.8.21
and KtLint0.49.1
(see #β5893 #β5723 #β5877 #β6028 #β6043 #β5995 #β5996)Changelog
comments
with a list of regexes toForbiddenComment
- #β5981requireRootInDeclaration
check inInvalidPackageDeclaration
- #β6045detekt-versions.properties
instead ofversions.properties
- #β6006allowOmitUnit
to ruleLibraryCodeMustSpecifyReturnType
- #β58618c8d71d
- #β5966Unit
for ImplicitUnitReturnType rule - #β5857TestConfig
usages - #β5801name
that return name after backticks - #β5719CanBeNonNullable
rule - #β5714MaxLineLength
- #β5583Dependency Updates
Housekeeping & Refactorings
eaaf4be
- #β6102dependenciesAsNames
- #β6059ClassNaming
andFunctionNaming
- #β6019detekt-generator
- #β5854generateWebsite
- #β5849@Suppress("ReturnCount")
- #β5841times
method, use stdlib'srepeat
instead. - #β5774Contributors
We would like to thank the following contributors that made this release possible: @β3flex, @βBeBAKE, @βBraisGabin, @βGoooler, @βSaumyaBhushan, @βTWiStErRob, @βVitalyVPinchuk, @βadef145, @βasomov, @βatulgpt, @βchao2zhang, @βcketti, @βcortinico, @βdrawers, @βdzirbel, @βigorwojda, @βlexa-diky, @βluanpotter, @βmarschwar, @βmjovanc, @βmmorozkov, @βncteisen, @βosipxd, @βov7a, @βschalkms, @βt-kameyama, @βtresni
See all issues at: 1.23.0
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, a place for users to share their 3rd party rules and extensions.
We want to take the opportunity to thank our Sponsors 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 channel on KotlinLang's Slack (you can get an invite here).
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-libraries:$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
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 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 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 channel on KotlinLang's Slack (you can get an invite here).
Notable Changes
NullableBooleanCheck
- #β4872CouldBeSequence
- #β4855UnnecessaryBackticks
- #β4764ForbiddenSuppress
- #β4899MaxChainedCallsOnSameLine
- #β4985CascadingCallWrapping
- #β4979NestedScopeFunctions
- #β47881.22.0
.Migration
We fixed a bug related to function with KDocs and how their location in the source code was calculated (see #β4961 and #β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
Configuration
π Schedule: Branch creation - "every weekday" (UTC), Automerge - At any time (no schedule defined).
π¦ Automerge: Enabled.
β» Rebasing: Whenever PR is behind base branch, 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.