diff --git a/README.md b/README.md index 387b0ba..978a7c8 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ To have your sources automatically formatted on each build, add to your pom.xml: com.coveo fmt-maven-plugin - 2.11 + 2.12 @@ -43,7 +43,7 @@ If you prefer, you can only check formatting at build time using the `check` goa com.coveo fmt-maven-plugin - 2.11 + 2.12 @@ -81,7 +81,7 @@ example: com.coveo fmt-maven-plugin - 2.11 + 2.12 some/source/directory some/test/directory @@ -124,7 +124,7 @@ example to not display the non-compliant files: com.coveo fmt-maven-plugin - 2.11 + 2.12 false @@ -147,7 +147,7 @@ example to limit the display up to 10 files com.coveo fmt-maven-plugin - 2.11 + 2.12 10 diff --git a/pom.xml b/pom.xml index dede234..f9f4e00 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 maven-plugin ${project.groupId}:${project.artifactId} @@ -141,7 +141,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/main/java/com/coveo/AbstractFMT.java b/src/main/java/com/coveo/AbstractFMT.java index b90204e..8ce564b 100644 --- a/src/main/java/com/coveo/AbstractFMT.java +++ b/src/main/java/com/coveo/AbstractFMT.java @@ -3,7 +3,6 @@ import com.google.common.base.Charsets; import com.google.common.io.CharSource; import com.google.googlejavaformat.java.*; - import java.io.File; import java.io.FileFilter; import java.io.IOException; @@ -23,17 +22,15 @@ public abstract class AbstractFMT extends AbstractMojo { @Parameter( - defaultValue = "${project.build.sourceDirectory}", - property = "sourceDirectory", - required = true - ) + defaultValue = "${project.build.sourceDirectory}", + property = "sourceDirectory", + required = true) private File sourceDirectory; @Parameter( - defaultValue = "${project.build.testSourceDirectory}", - property = "testSourceDirectory", - required = true - ) + defaultValue = "${project.build.testSourceDirectory}", + property = "testSourceDirectory", + required = true) private File testSourceDirectory; @Parameter(defaultValue = "${project.packaging}", required = true) @@ -147,9 +144,7 @@ public void formatSourceFilesInDirectory( FileFilter fileNameFilter = getFileNameFilter(); FileFilter pathFilter = getPathFilter(); long failures = - paths - .collect(Collectors.toList()) - .parallelStream() + paths.collect(Collectors.toList()).parallelStream() .filter(p -> p.toFile().exists()) .map(Path::toFile) .filter(fileNameFilter::accept) diff --git a/src/test/resources/additionalfolders/pom.xml b/src/test/resources/additionalfolders/pom.xml index 82e82b5..692d298 100644 --- a/src/test/resources/additionalfolders/pom.xml +++ b/src/test/resources/additionalfolders/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 ${project.basedir}/src/additionalfolder diff --git a/src/test/resources/check_formatted/pom.xml b/src/test/resources/check_formatted/pom.xml index be826fe..3c7c185 100644 --- a/src/test/resources/check_formatted/pom.xml +++ b/src/test/resources/check_formatted/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/check_notformatted/pom.xml b/src/test/resources/check_notformatted/pom.xml index be826fe..3c7c185 100644 --- a/src/test/resources/check_notformatted/pom.xml +++ b/src/test/resources/check_notformatted/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/check_notformatted_ignored/pom.xml b/src/test/resources/check_notformatted_ignored/pom.xml index bbbcf5e..9dce494 100644 --- a/src/test/resources/check_notformatted_ignored/pom.xml +++ b/src/test/resources/check_notformatted_ignored/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 ^((?!\Wignored\W).)*\.java$ diff --git a/src/test/resources/failed_formatting/pom.xml b/src/test/resources/failed_formatting/pom.xml index a82fcd1..0331596 100644 --- a/src/test/resources/failed_formatting/pom.xml +++ b/src/test/resources/failed_formatting/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/failonerrormissingsources/pom.xml b/src/test/resources/failonerrormissingsources/pom.xml index bdc0ddf..fab4bf9 100644 --- a/src/test/resources/failonerrormissingsources/pom.xml +++ b/src/test/resources/failonerrormissingsources/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 true diff --git a/src/test/resources/failonerrorwithsources/pom.xml b/src/test/resources/failonerrorwithsources/pom.xml index bdc0ddf..fab4bf9 100644 --- a/src/test/resources/failonerrorwithsources/pom.xml +++ b/src/test/resources/failonerrorwithsources/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 true diff --git a/src/test/resources/failonunknownstyle/pom.xml b/src/test/resources/failonunknownstyle/pom.xml index b5a7e05..cbcc143 100644 --- a/src/test/resources/failonunknownstyle/pom.xml +++ b/src/test/resources/failonunknownstyle/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/importunsorted/pom.xml b/src/test/resources/importunsorted/pom.xml index 56d2cf0..9d48392 100644 --- a/src/test/resources/importunsorted/pom.xml +++ b/src/test/resources/importunsorted/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/importunused/pom.xml b/src/test/resources/importunused/pom.xml index 56d2cf0..9d48392 100644 --- a/src/test/resources/importunused/pom.xml +++ b/src/test/resources/importunused/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/nosource/pom.xml b/src/test/resources/nosource/pom.xml index 546066b..9eb7e62 100644 --- a/src/test/resources/nosource/pom.xml +++ b/src/test/resources/nosource/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/notestsource/pom.xml b/src/test/resources/notestsource/pom.xml index 546066b..9eb7e62 100644 --- a/src/test/resources/notestsource/pom.xml +++ b/src/test/resources/notestsource/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/onlyavajsources/pom.xml b/src/test/resources/onlyavajsources/pom.xml index 45f551e..37b992c 100644 --- a/src/test/resources/onlyavajsources/pom.xml +++ b/src/test/resources/onlyavajsources/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 ${project.basedir}/src/additionalfolder diff --git a/src/test/resources/onlytestsources/pom.xml b/src/test/resources/onlytestsources/pom.xml index 546066b..9eb7e62 100644 --- a/src/test/resources/onlytestsources/pom.xml +++ b/src/test/resources/onlytestsources/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/simple/pom.xml b/src/test/resources/simple/pom.xml index 546066b..9eb7e62 100644 --- a/src/test/resources/simple/pom.xml +++ b/src/test/resources/simple/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/simple_aosp/pom.xml b/src/test/resources/simple_aosp/pom.xml index 9159b1e..ecbc787 100644 --- a/src/test/resources/simple_aosp/pom.xml +++ b/src/test/resources/simple_aosp/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/simple_google/pom.xml b/src/test/resources/simple_google/pom.xml index abdad1e..30d7841 100644 --- a/src/test/resources/simple_google/pom.xml +++ b/src/test/resources/simple_google/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/validateonly_formatted/pom.xml b/src/test/resources/validateonly_formatted/pom.xml index be826fe..3c7c185 100644 --- a/src/test/resources/validateonly_formatted/pom.xml +++ b/src/test/resources/validateonly_formatted/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12 diff --git a/src/test/resources/validateonly_notformatted/pom.xml b/src/test/resources/validateonly_notformatted/pom.xml index be826fe..3c7c185 100644 --- a/src/test/resources/validateonly_notformatted/pom.xml +++ b/src/test/resources/validateonly_notformatted/pom.xml @@ -23,7 +23,7 @@ com.coveo fmt-maven-plugin - 2.11 + 2.12