pinterest / ktlint

An anti-bikeshedding Kotlin linter with built-in formatter
https://pinterest.github.io/ktlint/
MIT License
6.06k stars 504 forks source link

Bug in Intellij IDEA plugin, multiple messages at once #2659

Closed ellet0 closed 1 month ago

ellet0 commented 1 month ago

Observed Behavior

The Intellij IDEA Ktlint plugin show the message Ktlint found <number> lint violations of which <number> can be autocorrected>

image

Expected Behavior

It would be useful to show the message only once or add an option to close the message as showing it multiple times can cover the whole editor or even the screen and it keep going infinitely

Steps to Reproduce

This issue report is not very useful because I'm not sure how to reproduce it, I mostly focus on the code, not the message, but there is one way that might work which is to cause too many lint violations in the project (around 25 or more) and then once the message show keep coding and ignore it and it might duplicated more

Your Environment

The Ktlint mode is not set to any option in the project but I think it did happen on another project where I actually have Ktlint enabled

image

image

IntelliJ IDEA info:


IntelliJ IDEA 2024.1.1 (Community Edition)
Build #IC-241.15989.150, built on April 29, 2024
Runtime version: 17.0.10+1-b1207.14 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.2.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 10
Metal Rendering is ON
Registry:
  ide.experimental.ui=true
  terminal.new.ui=true
Non-Bundled Plugins:
  com.jetbrains.space (241.15989.9)
  com.nbadal.ktlint (0.22.0)
  com.varabyte.kobweb (0.1.0)
Kotlin: 241.15989.150-IJ
paul-dingemans commented 1 month ago

The ktlint-intellij-plugin lives at another repository. Please create the issue in that project. But I have already had a look an cannot reproduce it. Screenshot 2024-05-16 at 18 31 35

ellet0 commented 1 month ago

The ktlint-intellij-plugin lives at another repository. Please create the issue in that project. But I have already had a look an cannot reproduce it. Screenshot 2024-05-16 at 18 31 35

it happens after some hours, not directly, still would be nice to have the close/ignore button