Class BaselineKt
-
- All Implemented Interfaces:
public final class BaselineKt
-
-
Method Summary
Modifier and Type Method Description final static BaselineloadBaseline(String path)Loads the Baseline from the file located on path. final static BaselineloadBaseline(String path, BaselineErrorHandling errorHandling)Loads the Baseline from the file located on path. final static BooleancontainsLintError(List<KtlintCliError> $self, KtlintCliError ktlintCliError)Checks if the list contains the given KtlintCliError. final static BooleandoesNotContain(List<KtlintCliError> $self, KtlintCliError ktlintCliError)Checks if the list does not contain the given KtlintCliError. -
-
Method Detail
-
loadBaseline
@Deprecated(message = "Marked for removal in Ktlint 2.0", replaceWith = @ReplaceWith(imports = {}, expression = "loadBaseline(path, BaselineErrorHandling.LOG)")) final static Baseline loadBaseline(String path)
Loads the Baseline from the file located on path. Exceptions are swallowed and log message is written. On error, the baseline file is deleted.
-
loadBaseline
final static Baseline loadBaseline(String path, BaselineErrorHandling errorHandling)
Loads the Baseline from the file located on path. In case the baseline file can not be loaded successfully, it will be deleted.
-
containsLintError
final static Boolean containsLintError(List<KtlintCliError> $self, KtlintCliError ktlintCliError)
Checks if the list contains the given KtlintCliError. The List.contains function can not be used as KtlintCliError.detail is not available in the baseline file and a normal equality check on the KtlintCliError fails.
-
doesNotContain
final static Boolean doesNotContain(List<KtlintCliError> $self, KtlintCliError ktlintCliError)
Checks if the list does not contain the given KtlintCliError. The List.contains function can not be used as KtlintCliError.detail is not available in the baseline file and a normal equality check on the KtlintCliError fails.
-
-
-
-