Package com.diffplug.spotless.java
Class TableTestFormatterStep
java.lang.Object
com.diffplug.spotless.java.TableTestFormatterStep
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault fallback indent size (4) for Java/Kotlin files, matchingConfig.SPACES_4.static final StringDefault fallback indent style ("space") for Java/Kotlin files. -
Method Summary
Modifier and TypeMethodDescriptionstatic FormatterStepcreate(Provisioner provisioner) Creates a step which formats@TableTesttables using the default version and indent config.static FormatterStepcreate(String version, Provisioner provisioner) Creates a step which formats@TableTesttables using the given version and default indent config.static FormatterStepcreate(String version, Provisioner provisioner, String indentStyle, int indentSize) Creates a step which formats@TableTesttables using the given version and fallback indent config.static StringGet default formatter version.static intvalidateIndentSize(int indentSize) static StringvalidateIndentStyle(String indentStyle)
-
Field Details
-
DEFAULT_INDENT_STYLE
Default fallback indent style ("space") for Java/Kotlin files.- See Also:
-
DEFAULT_INDENT_SIZE
public static final int DEFAULT_INDENT_SIZEDefault fallback indent size (4) for Java/Kotlin files, matchingConfig.SPACES_4.- See Also:
-
-
Method Details
-
create
Creates a step which formats@TableTesttables using the default version and indent config. -
create
Creates a step which formats@TableTesttables 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@TableTesttables using the given version and fallback indent config.The fallback config is used when no
.editorconfigis found or the lookup fails.- Parameters:
version- the tabletest-formatter-core versionprovisioner- the jar provisionerindentStyle- fallback indent style:"space"or"tab"(case-insensitive)indentSize- fallback indent size (must be >= 0)
-
defaultVersion
Get default formatter version. -
validateIndentStyle
-
validateIndentSize
public static int validateIndentSize(int indentSize)
-