Class CascadeIndentationCheck

java.lang.Object
com.puppycrawl.tools.checkstyle.AbstractAutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck
com.qulice.checkstyle.CascadeIndentationCheck
All Implemented Interfaces:
com.puppycrawl.tools.checkstyle.api.Configurable, com.puppycrawl.tools.checkstyle.api.Contextualizable, com.puppycrawl.tools.checkstyle.api.FileSetCheck

public final class CascadeIndentationCheck extends com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck
Make sure each line indentation is either:
  • the same as previous one or less
  • bigger than previous by exactly 4
Also, if the previous non-empty line consists only of closing brackets (and optional trailing semicolon or comma), the current line indentation must not be greater than that of the closing bracket line, since the expression has been already terminated. All other cases must cause a failure.
Since:
0.3
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.AbstractAutomaticBean

    com.puppycrawl.tools.checkstyle.AbstractAutomaticBean.OutputStreamOptions
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    processFiltered(File file, com.puppycrawl.tools.checkstyle.api.FileText lines)
     

    Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck

    addViolations, beginProcessing, destroy, finishProcessing, fireErrors, getFileContents, getFileExtensions, getMessageDispatcher, getTabWidth, getViolations, init, log, log, process, setFileContents, setFileExtensions, setMessageDispatcher, setTabWidth

    Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter

    finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity

    Methods inherited from class com.puppycrawl.tools.checkstyle.AbstractAutomaticBean

    configure, contextualize, getConfiguration, setupChild

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.puppycrawl.tools.checkstyle.api.Configurable

    configure

    Methods inherited from interface com.puppycrawl.tools.checkstyle.api.Contextualizable

    contextualize
  • Constructor Details

    • CascadeIndentationCheck

      public CascadeIndentationCheck()
  • Method Details

    • processFiltered

      public void processFiltered(File file, com.puppycrawl.tools.checkstyle.api.FileText lines)
      Specified by:
      processFiltered in class com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck