Class TableTestFormatterStep

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

public final class TableTestFormatterStep extends Object implements Serializable
Formats @TableTest annotation tables in Java and Kotlin source files.

Configuration is read from .editorconfig files. When no editorconfig is found or the lookup fails, the configured fallback indent style and size are used. If no fallback is configured, defaults matching Config.SPACES_4 and Config.NO_INDENT are applied.

See Also:
  • Field Details

    • DEFAULT_INDENT_STYLE

      public static final String DEFAULT_INDENT_STYLE
      Default fallback indent style ("space") for Java/Kotlin files.
      See Also:
    • DEFAULT_INDENT_SIZE

      public static final int DEFAULT_INDENT_SIZE
      Default fallback indent size (4) for Java/Kotlin files, matching Config.SPACES_4.
      See Also:
  • Method Details

    • create

      public static FormatterStep create(Provisioner provisioner)
      Creates a step which formats @TableTest tables using the default version and indent config.
    • create

      public static FormatterStep create(String version, Provisioner provisioner)
      Creates a step which formats @TableTest tables using the given version and default indent config.
    • create

      public static FormatterStep create(String version, Provisioner provisioner, String indentStyle, int indentSize)
      Creates a step which formats @TableTest tables using the given version and fallback indent config.

      The fallback config is used when no .editorconfig is found or the lookup fails.

      Parameters:
      version - the tabletest-formatter-core version
      provisioner - the jar provisioner
      indentStyle - fallback indent style: "space" or "tab" (case-insensitive)
      indentSize - fallback indent size (must be >= 0)
    • defaultVersion

      public static String defaultVersion()
      Get default formatter version.
    • validateIndentStyle

      public static String validateIndentStyle(String indentStyle)
    • validateIndentSize

      public static int validateIndentSize(int indentSize)