Package com.spotify.fmt
Class Check
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- com.spotify.fmt.AbstractFMT
-
- com.spotify.fmt.Check
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="check", defaultPhase=VERIFY, threadSafe=true) public class Check extends AbstractFMTCheck mojo that will ensure all files are formatted. If some files are not formatted, an exception is thrown.
-
-
Constructor Summary
Constructors Constructor Description Check()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetProcessingLabel()Provides the name of the label used when a non-formatted file is found.protected voidpostExecute(com.spotify.fmt.FormattingResult result)Post Execute action.protected booleanshouldWriteReformattedFiles()Whether to write reformatted files to disk.-
Methods inherited from class com.spotify.fmt.AbstractFMT
execute, getResult
-
-
-
-
Method Detail
-
postExecute
protected void postExecute(com.spotify.fmt.FormattingResult result) throws org.apache.maven.plugin.MojoFailureExceptionPost Execute action. It is called at the end of the execute method. Subclasses can add extra checks.- Overrides:
postExecutein classAbstractFMT- Parameters:
result- The formatting result- Throws:
org.apache.maven.plugin.MojoFailureException- if there is an exception
-
shouldWriteReformattedFiles
protected boolean shouldWriteReformattedFiles()
Description copied from class:AbstractFMTWhether to write reformatted files to disk.- Specified by:
shouldWriteReformattedFilesin classAbstractFMT
-
getProcessingLabel
protected String getProcessingLabel()
Provides the name of the label used when a non-formatted file is found.- Specified by:
getProcessingLabelin classAbstractFMT- Returns:
- the label to use in the log
-
-