detekt v1.4.0 Release Notes

Release Date: 2020-01-12 // 13 days ago
  • Notable Changes

    🆕 New rule set coroutines with two specialized rules was added.
    As always new rules must be activated by the user until they get stable.

    coroutines: active: trueGlobalCoroutineUsage: active: falseRedundantSuspendModifier: active: false
    

    ⚡️ Wrapped KtLint was updated to 0.36.0 introducing two rules

    • EnumEntryNameCase
    • NoEmptyFirstLineInMethodBlock
    Migration

    🗄 The properties ignoreOverriddenFunction and ignoreOverriddenFunctions of some rules got deprecated and unified to a new property ignoreOverridden.

    🔄 Changelog
    • ♻️ Refactor BuildFailure code - #2250
    • 🛠 Fix nested methods bug in MethodOverloading rule - #2249
    • ThrowingExceptionInMain rule should consider main() function with no parameters - #2248
    • MethodOverloading bug with nested overloaded methods - #2247
    • ⬇️ Reduce complexity in FindingsReport - #2246
    • ➕ Add RedundantSuspendModifier rule - #2244
    • 🆕 New ktlint rules - #2243
    • Inline MethodOverloading case file - #2241
    • ✅ ThrowingExceptionInMain: fix #2248 and add tests - #2240
    • ➕ Add disposing Kotlin environment. - #2238
    • OOM on multiple invocations - #2237
    • 👌 Improve doc for UnusedPrivateMember - #2236
    • 🔧 Don't resolve dependencies during project configuration - #2235
    • ⏪ Revert "Introduce Pull Request Labeler" - #2234
    • 🛠 Fix #2230 equals() func detection - #2233
    • 🛠 Fix git commit-hook label and code snippet doc - #2232
    • WrongEqualsTypeParameter does not ignore multi-parameter equals methods - #2230
    • Introduce Pull Request Labeler - #2228
    • 🏗 Gradle plugin: Build upon default detekt config - #2227
    • 👕 Apply ktlint formatting plugin to Gradle plugin - #2226
    • ⬆️ Bump dependencies - #2225
    • ⚙ Run shadowJar & installShadowDist task with everything else - #2220
    • Travis: Use consistent Java vendor - #2219
    • 0️⃣ "Property is misspelled or does not exist" error for new rules in default rulesets - #2217
    • MethodOverloading false positive if every entry of an enum implement a method. - #2216
    • ➕ Add Git detekt pre-commit hook doc - #2214
    • ✂ Remove exclude workaround for new build property - #2203
    • ➕ Add GlobalCoroutineUsage rule + coroutines ruleset - #2174
    • ➕ Add rule [RedundantSuspend] to detect redundant suspend modifiers - #2156
    • 🗄 Deprecate ignoreOverriddenFunction/s in favor of ignoreOverridden - #2132

    👀 See all issues at: 1.4.0


Previous changes from v1.3.1

    • ✂ Remove old unused documentation - #2210
    • 👉 Show code snippet erros in html reports - #2209
    • 👕 Use compileAndLint in UnusedPrivateClassSpec - #2208
    • 🛠 Fix false positive in UnusedPrivateClass - #2207
    • ⚡️ Update readme promoting new properties of the gradle plugin - #2205
    • Rename default const containing ACCEPTED - #2204
    • Mistake From LongParameterList.kt - #2202
    • 🏗 Exclude yet unknown new build property - #2201
    • ➕ Add comment regarding type resolution to README - #2199
    • Type resolution doc - #2198
    • Correct indentation for Groovy DSL doc - #2197
    • 👉 Use shorthand syntax for assertThat() - #2196
    • ♻️ Refactor MagicNumber to use commaSeparatedPatterns - #2195
    • Attach FILE_PATH_USER_DATA_KEY user data on FormattingRules (#1907) - #2194
    • 🔌 Handle invalid config exit code in gradle plugin - #2193
    • ➕ Add tests showing how to exclude custom config properties in plugins - #2192
    • 🛠 Fix suppression of KtLint rules on file level - #2179 - #2191
    • Mention needed kotlinx.html library from jcenter - #2146 - #2190
    • UnusedPrivateClass has false positive behavior for deserialized items - #2158
    • 🏗 Use JDK 11 (LTS) + 13 for AppVeyor builds - #2141
    • Document how to create a common baseline file for multi module gradle projects - #2140
    • DetektAll with baseline fails with error - #2100
    • ForbiddenMethod Rule - #1954
    • Do not report auto-corrected formatting issues - #1840

    👀 See all issues at: 1.3.1