This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| io.gitlab.arturbosch.detekt:detekt-formatting (source) | 1.19.0
-> 1.20.0
| | | | |
Release Notes
detekt/detekt
We're extremely excited to share with you all the next upcoming stable release of Detekt: 1.20.0
๐
This release is coming with 16 new rules, new API and functionalities and several stability improvements.
First, much thanks to our sponsors โค๏ธ as we were able to buy a domain and move our website to https://detekt.dev/.
As for the feature shipped, we work a lot on the Reporting side: we added a new type of reporting, improved the styling of the existing one and
generally reduced the unnecessary warnings of run with type resolution.
For rules like ForbiddenMethod
where you can configure a signature of a method you want to use in your rule, we added a new syntax
that allows to reference generic methods & extension functions.
We update a lot of the libraries we depend on bringing Detekt up to the ecosystem: KtLint 0.45.2, Kotlin 1.6.20 and Gradle 7.4.2 to name a few.
Finally, we also migrated all of our tests from Spek to JUnit. This was a huge effort that will hopefully make easier for contributors
to be involved with Detekt.
As always, 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
- With this Detekt versions, rule authors can define the default configuration for their custom rules. This default configuration will be merged together with the user configuration and can be overridden by the user if they wish. More on this here #โ4315. The
formatting
ruleset provided by Detekt is updated to use this new mechanism - #โ4352
- We've added 16 new rules:
- UnnecessaryInnerClass - #โ4394
- CanBeNonNullableProperty - #โ4379
- NullCheckOnMutableProperty - #โ4353
- SuspendFunWithCoroutineScopeReceiver - #โ4616
- ElseCaseInsteadOfExhaustiveWhen - #โ4632
- TrailingComma - From KtLint - #โ4227
- UnnecessaryParenthesesBeforeTrailingLambda - From KtLint - #โ4630
- BlockCommentInitialStarAlignment - From KtLint - #โ4645
- CommentWrapping - From KtLint - #โ4645
- DiscouragedCommentLocation - From KtLint - #โ4645
- FunKeywordSpacing - From KtLint - #โ4645
- FunctionTypeReferenceSpacing - From KtLint - #โ4645
- KdocWrapping - From KtLint - #โ4645
- ModifierListSpacing - From KtLint - #โ4645
- TypeArgumentListSpacing - From KtLint - #โ4645
- Wrapping - From KtLint - #โ4645
- We've made several improvements to the console reporting:
- The HTML report has now a better CSS styling - #โ4447
- The default reporting format is now
LiteFindingsReport
(which is more compact reporting and similar to other tools in the ecosystem. You can see an example here) - #โ4449.
- We've added issue details to findings on
FindingsReport
and FileBasedFindingsReporter
- #โ4464
- We suppressed several warnings reported when running with type resolution - #โ4423
- We fixed a regression introduced in
1.19.0
for users using ignoreAnnotated
running without type resolution - #โ4570
- For rules like
ForbiddenMethod
where you can specify a method name in the config file, now we added support for:
- Matching functions with generics - #โ4460
- Matching extension functions - #โ4459
- We've fixed a security vulnerability related to XML parsing - #โ4499
- We've changed the behavior of the baseline task. Now the baseline is always update, even if you fixed all the issues in your codebase - #โ4445
- We now enable the naming ruleset by default also on tests. Previously they were excluded - #โ4438
- This version of Detekt is built with Gradle
v7.4.2
, AGP 7.1.3
and Kotlin 1.6.20
(see #โ4530 #โ4573 #โ4133 #โ4277 #โ4665)
- This version of Detekt is wrapping KtLint version
0.45.2
(see #โ4227 #โ4630 #โ4645 #โ4690)
- For contributors: we migrated all our tests from Spek to JUnit due to better support and tooling #โ4670.
Changelog
- Display dynamic --jvm-target values when using --help flag - #โ4694
- CanBeNonNullable shouldn't consider abstract properties - #โ4686
- NonBooleanPropertyPrefixedWithIs: Allow boolean function reference - #โ4684
- [VarCouldBeVal] fix overrides false positives - #โ4664
- Add ignoreOverridden support for BooleanPropertyNaming rule - #โ4654
- Fix regression generating configuration - #โ4646
- Fix concurrency issue when creating PomModel (#โ4609) - #โ4631
- UnnecessaryAbstractClass: fix false positive when the abstract class has properties in the primary constructor - #โ4628
- Properly set toolVersion on DetektExtension - #โ4623
- NamedArguments: Ignore when argument values are the same as the parameter name - #โ4613
- Parallel invocation of AnalysisFacade fails spuriously in 1.20.0-RC1 - #โ4609
- NoSuchElementException after updating to 1.20.0-RC1 - #โ4604
- Better error classification in Gradle Enterprise. - #โ4586
- Fix for missing /kotlin folder when running on Android projects - #โ4554
- Deprecate continuationIndentSize from the Indentation rule - #โ4551
- Fix performance issue for regexp in Reporting.kt - #โ4550
- Revert "trim values when parsing the baseline (#โ4335)" - #โ4548
- Fix AutoCorrection crashing with Missing extension point - #โ4545
- Make DoubleMutabilityForCollection configurable and set a DoubleMutability alias - #โ4541
- Fix
AnnotationExcluder
- #โ4518
- Fix false positive of UnnecessaryInnerClass - #โ4509
- [MaxLineLength] Fix signature in for blank characters in the Baseline - #โ4504
- Fix overridden function reporting for CanBeNonNullable rule - #โ4497
- Set the name of functions and paramenters between ` to improve the readability - #โ4488
- update InvalidPackageDeclaration to report if rootPackage is not present - #โ4484
- [VarCouldBeVal] Override vars will not be flagged if bindingContext is not set - #โ4477
- Document the overlapping rules from
formatting
- #โ4473
- Match functions signatures with lambdas on it - #โ4458
- Add option for OutdatedDocumentation to allow param in constructor prโฆ - #โ4453
- Ignore private operators when we don't have ContextBingding in UnusedPrivateMember - #โ4441
- Add documentation for
Suppressor
s - #โ4440
- [FunctionNaming] Don't allow the usage of ` in function names - #โ4439
- Add list of functions to skip in IgnoredReturnValue rule - #โ4434
- Extend CanBeNonNullable rule to check function params - #โ4431
- Extend VarCouldBeVal to include analysis of file- and class-level properties - #โ4424
- Formulate rule/sample-extensions descriptions consistently - #โ4412
- Fix false-positive on ExplicitCollectionElementAccessMethod - #โ4400
- Fixes false negatives in
UnnecessaryAbstractClass
- #โ4399
- Add first draft of a rule description style guide - #โ4386
- Forbid usage of java.lang.ClassLoader.getResourceAsStream - #โ4381
- Update Sponsor button to Detekt's one - #โ4378
- [OptionalUnit] Allow a function to declare a Unit return type when it uses a generic function initializer - #โ4371
- Completely-empty abstract classes will now be flagged by UnnecessaryAbstractClass - #โ4370
- Fix false positive in RethrowCaughtException for try with more than one catch (#โ4367) - #โ4369
- Testing and rule improvement for EmptyElseBlock - #โ4349
- UnusedPrivateMember should not report external classes/interfaces - #โ4347
- [UseDataClass] Do not report on
inner
classes - #โ4344
- Support jvmTarget 17 - #โ4287
- UnderscoresInNumericLiterals: Allow numbers with non standard groupings - #โ4280
- Introduce DefaultValue type - #โ3928
Dependency Updates
- Update plugin dokka to v1.6.20 - #โ4717
- Update dependency com.android.tools.build:gradle to v7.1.3 - #โ4695
- JaCoCo 0.8.8 - #โ4680
- Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.6.1 - #โ4673
- Update dependency gradle to v7.4.2 - #โ4658
- Update dependency org.jetbrains.kotlinx:kotlinx-html-jvm to v0.7.5 - #โ4657
- Update dependency gradle to v7.4.1 - #โ4622
- Update dependency com.android.tools.build:gradle to v7.1.2 - #โ4594
- Update dependency com.android.tools.build:gradle to v7.1.1 - #โ4561
- Update plugin pluginPublishing to v0.20.0 - #โ4502
- Update JamesIves/github-pages-deploy-action action to v4.2.1 - #โ4475
- Update JamesIves/github-pages-deploy-action action to v4.1.9 - #โ4455
- Update plugin gradleVersions to v0.41.0 - #โ4454
- Revert "Update plugin pluginPublishing to v0.19.0 (#โ4429)" - #โ4452
- Update plugin pluginPublishing to v0.19.0 - #โ4429
- Update dependency io.mockk:mockk to v1.12.2 - #โ4427
- Shadow 7.1.2 - #โ4422
- Update plugin dokka to v1.6.10 - autoclosed - #โ4407
- Update dependency org.jetbrains.dokka:jekyll-plugin to v1.6.10 - #โ4406
- Update dependency org.jetbrains.kotlinx:kotlinx-coroutines-core to v1.6.0 - #โ4393
- Update dependency gradle to v7.3.3 - #โ4392
- Update dependency org.yaml:snakeyaml to v1.30 - #โ4375
- Update dependency gradle to v7.3.2 - #โ4374
- Update plugin shadow to v7.1.1 - #โ4373
- Update dependency gradle to v7.3.1 - #โ4350
- Update plugin dokka to v1.6.0 - #โ4328
Housekeeping & Refactorings
- Add missing Test annotations - #โ4699
- Add failure message assertions to Gradle's "expect failure" tests - #โ4693
- Drop (most) Groovy DSL tests - #โ4687
- Check detekt-gradle-plugin functionalTest source when running detekt task - #โ4681
- Fix typo in AvoidReferentialEquality rule description - #โ4644
- Housekeep Gradle scripts - #โ4589
- Refactor config printer to improve testability - #โ4580
- avoid usage of java stream for parameterized tests - #โ4579
- split rule documentation printer to improve testability - #โ4578
- Make VERSION_CATALOGS stable - #โ4577
- Enable Gradle's configuration cache by default - #โ4576
- Migrate detekt-rules-performance tests to JUnit - #โ4569
- Migrate detekt-rules-complexity tests to JUnit - #โ4566
- Drop Groovy DSL testing in DetektTaskDslSpec - #โ4563
- Reuse
setReportOutputConventions
- #โ4546
- Code cleanups - #โ4542
- Fix MaxLineLength violation on detekt main inside IgnoredReturnValue rule - #โ4539
- Use Java 17 for all CI jobs - #โ4526
- Migrate tests in detekt-rules-errorprone to junit - #โ4523
- Drop unused dependencies - #โ4506
- Update JUnit dependencies - #โ4505
- Fixes test for LiteFindingsReport - #โ4479
- Remove outdated detekt suppression - #โ4468
- Add test cases to RedundantSuspendModifier rule - #โ4430
- Refactor MultilineLambdaItParameter rule - #โ4428
- Formulate rule/naming descriptions consistently - #โ4419
- Formulate rule/bugs descriptions consistently - #โ4418
- Formulate rule/complexity descriptions consistently - #โ4417
- Formulate rule/documentation descriptions consistently - #โ4416
- Formulate rule/coroutines descriptions consistently - #โ4415
- Formulate rule/style descriptions consistently - #โ4414
- Formulate rule/exceptions descriptions consistently - #โ4413
- Formulate rule/performance descriptions consistently - #โ4411
- Make MultiRuleCollector.kt consistent with the DoubleMutabilityForCollection rule - #โ4405
- Add test for nested SwallowedException - #โ4404
- Disable CI for Windows & JDK8 - #โ4403
- Improve test description in ForEachOnRangeSpec.kt - #โ4402
- Don't define classes on default package - #โ4401
- Config file in directory test - #โ4398
- Remove unnecessary map lambda in test code - #โ4397
- Improve
AnnotationExcluder
tests - #โ4368
- Enable UseAnyOrNoneInsteadOfFind - #โ4362
- Enable ForbiddenMethodCall - #โ4334
See all issues at: 1.20.0
Configuration
๐
Schedule: "before 4am on Saturday" (UTC).
๐ฆ 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 WhiteSource Renovate. View repository job log here.