detekt-intellij-plugin icon indicating copy to clipboard operation
detekt-intellij-plugin copied to clipboard

maxLineLength in config not picked up by plugin

Open adrianlandborn opened this issue 1 year ago • 0 comments

There seems to be some inconsistency with the config (and potentially Ktlint and default IntelliJ/Android studio rules).

Running:

  • detekt plugin 2.3.0
  • io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.4
  • org.jlleitschuh.gradle:ktlint-gradle:12.1.0
  • Android Studio Hedgehog | 2023.1.1 Patch 1

In detekt plugin, check "enable formatting (ktlint) rules" Now I get this warning everywhere where the line exceeds 120 characters. image

The problem is the it is not set to 120 but 150 in all places.

  • Code style inside Android studio setting
  • .editorconfig
  • detekt config

image image

Also note maxLineLength vs maximumLineLength. Depending what I set in detekt.yml I get the opposite shown by the plugin? 🤔

adrianlandborn avatar Jan 16 '24 11:01 adrianlandborn