Skip to content

v1.15.0

Compare
Choose a tag to compare
@arturbosch arturbosch released this 18 Dec 18:06
37f0a1d
  • 2020-12-18
Notable Changes

detekt 1.15.0 bundles Kotlin 1.4.10.
You may experience some known issues when your project already used 1.4.20

In addition to many rule improvements, there are also new ones:

  • RedundantHigherOrderMapUsage
  • ListAllWhenCases
  • UseIfEmptyOrIfBlank

We added documentation on how to configure type resolution.
Only the rules marked with Requires Type Resolution are run (
e.g. https://detekt.github.io/detekt/style.html#forbiddenmethodcall).

detekt now supports SARIF as an output format. In the future you will be able to
upload this format to GitHub and see detekt issues right in your pull requests.

Migration

We removed implementations of the Config interface from the public api.
It was first deprecated and then moved to internal package earlier this year.
Rule authors can use TestConfig(Map) or yamlConfig(String) from detekt-test to test their rules.

  • Move internal config api to core module - #3163
Changelog
  • NamedArguments: fix false positive with java method call - #3290
  • Prepare 1.15.0 rc2 - #3286
  • UnconditionalJumpStatementInLoop: don't report a return after a conditional jump
  • Add MuseDev to the list of integrations - #3284
  • Fix ForbiddenComment rule not checking for KDoc - #3275
  • ForbiddenComments don't report TODO: in KDoc - #3273
  • Add IntelliJ platform plugin template integration to readme - #3270
  • Bundle new sarif output format by default - #3268
  • Add a test for UnusedImports with annotations used as attributes #3246
  • Add documentation page on type resolution - #3225
  • ThrowsCount rule: fix false positive with nested function - #3223
  • False positive in ThrowsCount rule - #3222
  • Refactor UnsafeCallOnNullableType rule - #3221
  • Fix false negatives in UnreachableCode rule - #3220
  • False negatives in UnreachableCode rule - #3219
  • Refactor RedundantElseInWhen to use compiler warning - #3214
  • NullableToStringCall: fix false negative with safe qualified expression
  • False negative in NullableToStringCall - #3211
  • NullableToStringCall: fix false negatives with qualified expression
  • False negatives in NullableToStringCall - #3196
  • Check for presence of null case in MissingWhenCase rule - #3194
  • Throw error instead of logging as error in analysis phase - #3193
  • Make kotlinc adapted rule comments internal - #3190
  • MissingWhenCase false negative with nulls - #3189
  • Check for static imports in unused imports rule - #3188
  • Add allowElseExpression configuration for MissingWhenCase rule - #3187
  • Add UseIfEmptyOrIfBlank rule - #3186
  • Fix detektBaseline task filtering .java files - #3185
  • Internal exception should fail the gradle task - #3183
  • Add RedundantHigherOrderMapUsage rule - #3182
  • Fix false negative in IgnoredReturnValue - #3179
  • Fix false positive when to is used to create a pair within a function
  • False Positive PreferToOverPairSyntax - #3177
  • ListAllWhenCases new rule - #3176
  • Suppress RedundantVisibilityModifierRule if explicit API mode enabled
  • Hardcode default values - #3171
  • False negative in IgnoredReturnValue - #3170
  • Fix false positive in IgnoredReturnValue - #3169
  • Duplicate deprecated KtLint methods - #3168
  • Introduce NamedArguments rule - #3167
  • Add JSON Schema documentation - #3166
  • Fix MaxLineLengthSuppressed ignoring @Suppress annotation on class
  • Use the properties syntax in Gradle docs - #3158 - #3161
  • Fix rule LibraryCodeMustSpecifyReturnType - #3155
  • Update README to mention config auto-complete - #3143
  • @Suppress("MaxLineLength") not working for simple block comment inside class
  • Support sarif as a report type - #3045 - #3132
  • UnusedImports false positive for enums in annotation attributes (with type resolution)
  • Unable to generate detektMain baseline for UnsafeCallOnNullableType violations in Android (mixed Kotlin + Java)
    modules - #3130
  • Suppress RedundantVisibilityModifierRule if explicit API mode enabled
  • SARIF export support - #3045
  • IgnoredReturnValue false positives - #3043
  • Offset calculation in KtLint deprecated/made private - #3021
  • Map { it } must return an error - #2975
  • Upload detekt-formatting plugin to Github releases next to precompiled cli binary
  • Add a rule to flag places where ifBlank and ifEmpty can be used
  • Remove hardcoded default values from rules - #2597
  • Doc: type and symbol solving - #2259
  • Suggestion: LongParameterList rule but on method call if named argument is not used
Housekeeping & Refactorings
  • Standardize "active" constant - #3292
  • Update Spek to v2.0.15 - #3287
  • Reformat code indentation in ReturnFromFinallySpec.kt - #3278
  • Inline ReturnFromFinally report message text - #3277
  • Simplify ReturnFromFinally check for finally expressions - #3276
  • CI with Java 15 - #3262
  • Enabled publishing of sha256 and sha512 signatures - #3249
  • Remove default config entries in detekt.yml - #3239
  • Fix grammar in configuration guide - #3238
  • Exclude detekt:LargeClass rule in test sources - #3237
  • Release 1.15.0 rc1 - #3236
  • Remove unused format function in RuleExtensions - #3234
  • Update spek to v2.0.14 - #3231
  • Remove already activated rules from detekt.yml - #3230
  • Fix broken website redirects - #3227
  • Remove unused resources from the website - #3226
  • Simplify EqualsOnSignatureLine rule - #3224
  • Remove unnecessary suppression in main - #3217
  • Simplify MissingWhenCase by removing an unnecessary alternative path
  • Refactor HasPlatformType rule - #3210
  • Remove Suppress annotation from ArrayPrimitive - #3209
  • Refactor UselessCallOnNotNull rule - #3208
  • Refactor MissingWhenCase - #3207
  • Refactor NullableToStringCall - #3206
  • Refactor RedundantElseInWhen - #3205
  • Refactor PreferToOverPairSyntax - #3204
  • Remove Suppress annotation from MagicNumber - #3203
  • Remove Suppress annotation from UnusedImports - #3202
  • Refactor FunctionNaming rule - #3201
  • Setup the website publishing pipeline - #3199
  • Improve code coverage for DefaultCliInvoker testing happy and error path
  • Make kotlinc adapted rule comments internal - #3192
  • Improve PreferToOverPairSyntax - #3181
  • Simplify PreferToOverPairSyntax check - #3180
  • Improves in IgnoredReturnValue - #3174
  • Move KtFileContent to FileParsingRule - #3173
  • Don't use deprectad onStart - #3172

See all issues at: 1.15.0