Class FenceStep

java.lang.Object
com.diffplug.spotless.generic.FenceStep

public class FenceStep extends Object
  • Method Details

    • named

      public static FenceStep named(String name)
      Declares the name of the step.
    • defaultToggleName

      public static String defaultToggleName()
    • defaultToggleOff

      public static String defaultToggleOff()
    • defaultToggleOn

      public static String defaultToggleOn()
    • openClose

      public FenceStep openClose(String open, String close)
      Defines the opening and closing markers.
    • regex

      public FenceStep regex(String regex)
      Defines the pipe via regex. Must have *exactly one* capturing group.
    • regex

      public FenceStep regex(Pattern regex)
      Defines the pipe via regex. Must have *exactly one* capturing group.
    • preserveWithin

      public FormatterStep preserveWithin(List<FormatterStep> steps)
      Returns a step which will apply the given steps but preserve the content selected by the regex / openClose pair.
    • applyWithin

      public FormatterStep applyWithin(List<FormatterStep> steps)
      Returns a step which will apply the given steps only within the blocks selected by the regex / openClose pair. Linting within the substeps is not supported.