Class Lint

java.lang.Object
com.diffplug.spotless.Lint
All Implemented Interfaces:
Serializable

public final class Lint extends Object implements Serializable
Models a linted line or line range. Note that there is no concept of severity level - responsibility for severity and confidence are pushed down to the configuration of the lint tool. If a lint makes it to Spotless, then it is by definition.
See Also:
  • Field Details

  • Method Details

    • atUndefinedLine

      public static Lint atUndefinedLine(String ruleId, String detail)
    • atLine

      public static Lint atLine(int line, String ruleId, String detail)
    • atLineRange

      public static Lint atLineRange(int lineStart, int lineEnd, String shortCode, String detail)
    • getLineStart

      public int getLineStart()
    • getLineEnd

      public int getLineEnd()
    • getShortCode

      public String getShortCode()
    • getDetail

      public String getDetail()
    • shortcut

      public static RuntimeException shortcut(Collection<Lint> lints)
      Returns an exception which will wrap all of the given lints using Lint.Has
    • shortcut

      public RuntimeException shortcut()
      Returns an exception which will wrap this lint using Lint.Has
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • addWarningMessageTo

      public void addWarningMessageTo(StringBuilder buffer, String stepName, boolean oneLine)