Skip to content

Commit

Permalink
Fix 'spring-javaformat.apply.skip' property and use info logging
Browse files Browse the repository at this point in the history
The `spring-javaformat.format.skip` should have been
`spring-javaformat.apply.skip` and logging that skip has occurred is
better at 'INFO' level.

Fixes gh-365
  • Loading branch information
philwebb committed Feb 23, 2023
1 parent 681e845 commit 4028226
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public class ApplyMojo extends FormatMojo {
/**
* Skip the execution.
*/
@Parameter(property = "spring-javaformat.format.skip", defaultValue = "false")
@Parameter(property = "spring-javaformat.apply.skip", defaultValue = "false")
private boolean skip;

@Override
protected void execute(List<File> files, Charset encoding, String lineSeparator)
throws MojoExecutionException, MojoFailureException {
if (this.skip || skipGlobally()) {
getLog().debug("skipping format apply as per configuration.");
getLog().info("skipping format apply as per configuration.");
return;
}
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class ValidateMojo extends FormatMojo {
protected void execute(List<File> files, Charset encoding, String lineSeparator)
throws MojoExecutionException, MojoFailureException {
if (this.skip || skipGlobally()) {
getLog().debug("skipping format validate as per configuration.");
getLog().info("skipping format validate as per configuration.");
return;
}
List<File> problems = getFormatter().formatFiles(files, encoding, lineSeparator)
Expand Down

0 comments on commit 4028226

Please sign in to comment.