kk1957
kk1957

Reputation: 8824

IntelliJ CE Red Markers

My IntelliJ is showing warnings in Red color. For example "Whitespace at end of line", "Are you sure you want to println? If yes, ...."

I have tried changing the setting at many place, no avail. For now, I am using Scala.

enter image description here

EDIT: I still want to see the warning, but not in Red color. I have tried changing this in the following settings, but it did not help. Where else can this be fixed? enter image description here enter image description here

Upvotes: -1

Views: 266

Answers (1)

Tomer Shetah
Tomer Shetah

Reputation: 8529

As @MateuszKubuszok mentioned in the comment, it is a scalastyle error. Here is the place that holds part of the message you are seeing. Basically you have three options:

  1. Fix that warning by removing the spaces. (The best IMHO)

  2. Wrap this line in scalastyle:off as suggested:

    // scalastyle:off
    println("Why?") // Followed by spaces          
    // scalastyle:on
    
  3. Disable this rule. At the root of this project there is a file called scalastyle-config.xml. In it there is a line:

    <check level="warning" class="org.scalastyle.file.WhitespaceEndOfLineChecker" enabled="true"></check>
    

    Change it into:

    <check level="warning" class="org.scalastyle.file.WhitespaceEndOfLineChecker" enabled="false"></check>
    

    will make this rule to not check your code.

Upvotes: 2

Related Questions