From 37af820c35eaa83ed42ddd41d77b8bc08d35f983 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 20 Oct 2018 13:58:04 +0200 Subject: [PATCH 1/3] Integration of eclipse-wtp CSS formatter. --- .../diffplug/spotless/css/CssDefaults.java | 40 ++++++++++ .../diffplug/spotless/css/package-info.java | 7 ++ plugin-gradle/README.md | 25 +++++- .../gradle/spotless/CssExtension.java | 76 +++++++++++++++++++ .../gradle/spotless/SpotlessExtension.java | 5 ++ plugin-maven/README.md | 33 +++++++- .../spotless/maven/AbstractSpotlessMojo.java | 6 +- .../com/diffplug/spotless/maven/css/Css.java | 50 ++++++++++++ .../diffplug/spotless/maven/css/Eclipse.java | 47 ++++++++++++ .../spotless/maven/MavenIntegrationTest.java | 4 + .../maven/generic/LicenseHeaderTest.java | 17 +++++ .../spotless/css/CssDefaultsTest.java | 51 +++++++++++++ 12 files changed, 356 insertions(+), 5 deletions(-) create mode 100644 lib/src/main/java/com/diffplug/spotless/css/CssDefaults.java create mode 100644 lib/src/main/java/com/diffplug/spotless/css/package-info.java create mode 100644 plugin-gradle/src/main/java/com/diffplug/gradle/spotless/CssExtension.java create mode 100644 plugin-maven/src/main/java/com/diffplug/spotless/maven/css/Css.java create mode 100644 plugin-maven/src/main/java/com/diffplug/spotless/maven/css/Eclipse.java create mode 100644 testlib/src/test/java/com/diffplug/spotless/css/CssDefaultsTest.java diff --git a/lib/src/main/java/com/diffplug/spotless/css/CssDefaults.java b/lib/src/main/java/com/diffplug/spotless/css/CssDefaults.java new file mode 100644 index 0000000000..1550d39401 --- /dev/null +++ b/lib/src/main/java/com/diffplug/spotless/css/CssDefaults.java @@ -0,0 +1,40 @@ +/* + * Copyright 2016 DiffPlug + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.diffplug.spotless.css; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** Common utilities for CSS */ +public class CssDefaults { + //Prevent instantiation + private CssDefaults() {}; + + /** + * Filter based on Eclipse-WTP org.eclipse.core.contenttype.contentTypes + * extension org.eclipse.wst.css.core.csssource. + */ + public static final List FILE_FILTER = Collections.unmodifiableList( + Arrays.asList("**/*.css")); + + /** + * Match line that starts with a selector. Selection is quite broad. + * Assure that multiline licenses have a proper indentation. + * Assure that your has been formatted before (no whitespace before first selector). + */ + public static final String DELIMITER_EXPR = "[A-Za-z\\.\\#]+"; +} diff --git a/lib/src/main/java/com/diffplug/spotless/css/package-info.java b/lib/src/main/java/com/diffplug/spotless/css/package-info.java new file mode 100644 index 0000000000..367ab208c8 --- /dev/null +++ b/lib/src/main/java/com/diffplug/spotless/css/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@ReturnValuesAreNonnullByDefault +package com.diffplug.spotless.css; + +import javax.annotation.ParametersAreNonnullByDefault; + +import com.diffplug.spotless.annotations.ReturnValuesAreNonnullByDefault; diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md index 16fca28c84..e02b138614 100644 --- a/plugin-gradle/README.md +++ b/plugin-gradle/README.md @@ -79,6 +79,7 @@ Spotless can check and apply formatting to any plain-text file, using simple rul * Eclipse's [CDT](#eclipse-cdt) C/C++ code formatter * Eclipse's java code formatter (including style and import ordering) +* Eclipse's [WTP-CSS](#eclipse-wtp-css) CSS code formatter * Eclipse's [WTP-XML](#eclipse-wtp-xml) XML code formatter * Google's [google-java-format](https://github.com/google/google-java-format) * [Groovy Eclipse](#groovy-eclipse)'s groovy code formatter @@ -318,6 +319,29 @@ spotless { Use the Eclipse to define the *Code Style preferences* (see [Eclipse documentation](https://www.eclipse.org/documentation/)). Within the preferences *Edit...* dialog, you can export your configuration as XML file, which can be used as a `configFile`. If no `configFile` is provided, the CDT default configuration is used. + + +## Applying to CSS sources + +```gradle +spotless { + css { + target '**/*.css' '**/*.css2'// Change file filter. By default files with 'css' extension are supported + eclipse().configFile './css-formatter.prefs' // Properties file of the Eclipse WTP formatter + // Use for example eclipse('4.7.3a') to specify a specific version of Eclipse, + // available versions are: https://github.com/diffplug/spotless/tree/master/lib-extra/src/main/resources/com/diffplug/spotless/extra/eclipse_wtp_formatters + // also supports license headers + licenseHeader '' // License header + licenseHeaderFile './license.txt' // License header file + } +} +``` + + + +### Eclipse [WTP](https://www.eclipse.org/webtools/) CSS formatter +Use Eclipse to define the *CSS Files* editor preferences (see [Eclipse documentation](http://help.eclipse.org/photon/topic/org.eclipse.wst.sse.doc.user/topics/tsrcedt025.html)) and the *Cleanup* preferences available in the *Source* menu (when editing a CSS file). The preferences are stored below your Eclipse workspace directory in `.metadata/.plugins/org.eclipse.core.runtime/org.eclipse.wst.css.core.prefs`. Note that only the differences to the default configuration are stored within the file. Omit the 'configFile' entirely to use the default Eclipse configuration. + ## Applying to XML sources @@ -343,7 +367,6 @@ Use Eclipse to define the *XML editor preferences* (see [Eclipse documentation]( The Eclipse WTP formatter supports DTD/XSD restrictions on white spaces. For XSD/DTD lookup, relative and absolute XSD/DTD URIs are supported. Furthermore a user catalog can be configured using the `userCatalog` property key. Add the property to the preference file or add an additional preference or properties files as an additional argument to the `configFile`. - ## License header options diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/CssExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/CssExtension.java new file mode 100644 index 0000000000..5c8ff77e6b --- /dev/null +++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/CssExtension.java @@ -0,0 +1,76 @@ +/* + * Copyright 2016 DiffPlug + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.diffplug.gradle.spotless; + +import static com.diffplug.gradle.spotless.PluginGradlePreconditions.requireElementsNonNull; + +import org.gradle.api.Project; + +import com.diffplug.spotless.css.CssDefaults; +import com.diffplug.spotless.extra.EclipseBasedStepBuilder; +import com.diffplug.spotless.extra.wtp.EclipseWtpFormatterStep; + +public class CssExtension extends FormatExtension implements HasBuiltinDelimiterForLicense { + static final String NAME = "css"; + + public CssExtension(SpotlessExtension rootExtension) { + super(rootExtension); + } + + public EclipseConfig eclipse() { + return new EclipseConfig(EclipseWtpFormatterStep.defaultVersion()); + } + + public EclipseConfig eclipse(String version) { + return new EclipseConfig(version); + } + + public class EclipseConfig { + private final EclipseBasedStepBuilder builder; + + EclipseConfig(String version) { + builder = EclipseWtpFormatterStep.createCssBuilder(GradleProvisioner.fromProject(getProject())); + builder.setVersion(version); + addStep(builder.build()); + } + + public void configFile(Object... configFiles) { + requireElementsNonNull(configFiles); + Project project = getProject(); + builder.setPreferences(project.files(configFiles).getFiles()); + replaceStep(builder.build()); + } + + } + + @Override + protected void setupTask(SpotlessTask task) { + if (target == null) { + target(CssDefaults.FILE_FILTER.toArray()); + } + super.setupTask(task); + } + + @Override + public LicenseHeaderConfig licenseHeader(String licenseHeader) { + return licenseHeader(licenseHeader, CssDefaults.DELIMITER_EXPR); + } + + @Override + public LicenseHeaderConfig licenseHeaderFile(Object licenseHeaderFile) { + return licenseHeaderFile(licenseHeaderFile, CssDefaults.DELIMITER_EXPR); + } +} diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java index 0b8409710c..5c3c5c3f34 100644 --- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java +++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessExtension.java @@ -118,6 +118,11 @@ public void sql(Action closure) { configure(SqlExtension.NAME, SqlExtension.class, closure); } + /** Configures the special css-specific extension for CSS files. */ + public void css(Action closure) { + configure(CssExtension.NAME, CssExtension.class, closure); + } + /** Configures the special xml-specific extension for XML/XSL/... files (XHTML is excluded). */ public void xml(Action closure) { configure(XmlExtension.NAME, XmlExtension.class, closure); diff --git a/plugin-maven/README.md b/plugin-maven/README.md index 0850d19c58..71ded5b761 100644 --- a/plugin-maven/README.md +++ b/plugin-maven/README.md @@ -74,6 +74,7 @@ Spotless supports the following powerful formatters: * Eclipse's java code formatter (including style and import ordering) * Eclipse's [CDT](https://www.eclipse.org/cdt/) C/C++ code formatter +* Eclipse's [WTP](https://www.eclipse.org/webtools/) CSS and XML code formatter * Google's [google-java-format](https://github.com/google/google-java-format) * User-defined license enforcement, regex replacement, etc. @@ -189,7 +190,31 @@ By default, all files matching `src/main/cpp/**/*.` and `src/test/cpp/**/*. ``` Use the Eclipse to define the *Code Style preferences* (see [Eclipse documentation](https://www.eclipse.org/documentation/)). Within the preferences *Edit...* dialog, you can export your configuration as XML file, which can be used as a configuration ``. If no `` is provided, the CDT default configuration is used. - + + +## Applying to CSS source + +By default, all files matching `src/**/*.css` Ant style pattern will be formatted. Each element under `` is a step, and they will be applied in the order specified. Every step is optional, and they will be applied in the order specified. + +```xml + + + + + /* Licensed under Apache-2.0 */ + ${basedir}/license-header + + + ${basedir}/eclipse-fmt.pref + + 4.7.3a + + + +``` +Use Eclipse to define the *CSS Files* editor preferences (see [Eclipse documentation](http://help.eclipse.org/photon/topic/org.eclipse.wst.sse.doc.user/topics/tsrcedt025.html)) and the *Cleanup* preferences available in the *Source* menu (when editing a CSS file). The preferences are stored below your Eclipse workspace directory in `.metadata/.plugins/org.eclipse.core.runtime/org.eclipse.wst.css.core.prefs`. Note that only the differences to the default configuration are stored within the file. If no `` is provided, the WTP default configuration is used. + + ## Applying to XML source @@ -208,13 +233,15 @@ By default, all files matching `src/**/*.` Ant style pattern will be format 4.7.3a - + ``` -Use Eclipse to define the *XML editor preferences* (see [Eclipse documentation](https://www.eclipse.org/documentation/)). The preferences are stored below your Eclipse workspace directory in `.metadata/.plugins/org.eclipse.core.runtime/org.eclipse.wst.xml.core.prefs`. Note that only the differences to the default configuration are stored within the file. If no `` is provided, the WTP default configuration is used.. +Use Eclipse to define the *XML editor preferences* (see [Eclipse documentation](https://www.eclipse.org/documentation/)). The preferences are stored below your Eclipse workspace directory in `.metadata/.plugins/org.eclipse.core.runtime/org.eclipse.wst.xml.core.prefs`. Note that only the differences to the default configuration are stored within the file. If no `` is provided, the WTP default configuration is used. The Eclipse WTP formatter supports DTD/XSD restrictions on white spaces. For XSD/DTD lookup, relative and absolute XSD/DTD URIs are supported. Furthermore a user catalog can be configured using the `userCatalog` property key. Add the property to the preference ``. + + ## Applying to custom sources By default, no Ant-Style include patterns are defined. Each element under `` is a step, and they will be applied in the order specified. Every step is optional, and they will be applied in the order specified. It is possible to define multiple custom formats. diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java index 9bad00ecac..c4047403df 100644 --- a/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java @@ -37,6 +37,7 @@ import com.diffplug.spotless.LineEnding; import com.diffplug.spotless.Provisioner; import com.diffplug.spotless.maven.cpp.Cpp; +import com.diffplug.spotless.maven.css.Css; import com.diffplug.spotless.maven.generic.Format; import com.diffplug.spotless.maven.generic.LicenseHeader; import com.diffplug.spotless.maven.java.Java; @@ -94,6 +95,9 @@ public abstract class AbstractSpotlessMojo extends AbstractMojo { @Parameter private Cpp cpp; + @Parameter + private Css css; + protected abstract void process(List files, Formatter formatter) throws MojoExecutionException; @Override @@ -152,7 +156,7 @@ private FileLocator getFileLocator() { } private List getFormatterFactories() { - return Stream.concat(formats.stream(), Stream.of(java, scala, kotlin, cpp, xml)) + return Stream.concat(formats.stream(), Stream.of(java, scala, kotlin, cpp, css, xml)) .filter(Objects::nonNull) .collect(toList()); } diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/css/Css.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/css/Css.java new file mode 100644 index 0000000000..6f43c2c42a --- /dev/null +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/css/Css.java @@ -0,0 +1,50 @@ +/* + * Copyright 2016 DiffPlug + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.diffplug.spotless.maven.css; + +import java.util.Set; +import java.util.stream.Collectors; + +import com.diffplug.spotless.css.CssDefaults; +import com.diffplug.spotless.maven.FormatterFactory; +import com.diffplug.spotless.maven.generic.LicenseHeader; + +/** + * A {@link FormatterFactory} implementation that corresponds to {@code ...} configuration element. + *

+ * It defines a formatter for CSS source files that can execute both language agnostic (e.g. {@link LicenseHeader}) + * and css-specific (e.g. {@link Eclipse}) steps. + */ +public class Css extends FormatterFactory { + + private static final Set DEFAULT_INCLUDES = CssDefaults.FILE_FILTER + .stream().map(s -> "src/" + s).collect(Collectors.toSet()); + + @Override + public Set defaultIncludes() { + return DEFAULT_INCLUDES; + } + + public void addEclipse(Eclipse eclipse) { + addStepFactory(eclipse); + } + + @Override + public String licenseHeaderDelimiter() { + return CssDefaults.DELIMITER_EXPR; + } + +} diff --git a/plugin-maven/src/main/java/com/diffplug/spotless/maven/css/Eclipse.java b/plugin-maven/src/main/java/com/diffplug/spotless/maven/css/Eclipse.java new file mode 100644 index 0000000000..34fe14d76f --- /dev/null +++ b/plugin-maven/src/main/java/com/diffplug/spotless/maven/css/Eclipse.java @@ -0,0 +1,47 @@ +/* + * Copyright 2016 DiffPlug + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.diffplug.spotless.maven.css; + +import java.io.File; +import java.util.Arrays; + +import org.apache.maven.plugins.annotations.Parameter; + +import com.diffplug.spotless.FormatterStep; +import com.diffplug.spotless.extra.EclipseBasedStepBuilder; +import com.diffplug.spotless.extra.wtp.EclipseWtpFormatterStep; +import com.diffplug.spotless.maven.FormatterStepConfig; +import com.diffplug.spotless.maven.FormatterStepFactory; + +public class Eclipse implements FormatterStepFactory { + + @Parameter + private String file; + + @Parameter + private String version; + + @Override + public FormatterStep newFormatterStep(FormatterStepConfig stepConfig) { + EclipseBasedStepBuilder eclipseConfig = EclipseWtpFormatterStep.createCssBuilder(stepConfig.getProvisioner()); + eclipseConfig.setVersion(version == null ? EclipseWtpFormatterStep.defaultVersion() : version); + if (null != file) { + File settingsFile = stepConfig.getFileLocator().locateFile(file); + eclipseConfig.setPreferences(Arrays.asList(settingsFile)); + } + return eclipseConfig.build(); + } +} diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenIntegrationTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenIntegrationTest.java index d7528e05e4..8f0b5b2171 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenIntegrationTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenIntegrationTest.java @@ -110,6 +110,10 @@ protected void writePomWithCppSteps(String... steps) throws IOException { writePom(groupWithSteps("cpp", steps)); } + protected void writePomWithCssSteps(String... steps) throws IOException { + writePom(groupWithSteps("css", steps)); + } + protected void writePom(String... configuration) throws IOException { writePom(null, configuration); } diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/generic/LicenseHeaderTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/generic/LicenseHeaderTest.java index f5ca6f1e08..8f05932530 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/generic/LicenseHeaderTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/generic/LicenseHeaderTest.java @@ -50,6 +50,23 @@ public void fromContentCpp() throws Exception { assertFile(path).hasContent(cppLicense + '\n' + cppContent); } + @Test + public void fromContentCss() throws Exception { + String license = "/* my license */"; + writePomWithCssSteps( + "", + " ", + license, + " ", + ""); + + String path = "src/file.css"; + String content = "p {}"; + setFile(path).toContent(content); + mavenRunner().withArguments("spotless:apply").runNoError(); + assertFile(path).hasContent(license + '\n' + content); + } + @Test public void fromContentJava() throws Exception { writePomWithJavaSteps( diff --git a/testlib/src/test/java/com/diffplug/spotless/css/CssDefaultsTest.java b/testlib/src/test/java/com/diffplug/spotless/css/CssDefaultsTest.java new file mode 100644 index 0000000000..e5bc9beb61 --- /dev/null +++ b/testlib/src/test/java/com/diffplug/spotless/css/CssDefaultsTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2016 DiffPlug + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.diffplug.spotless.css; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.File; +import java.util.Arrays; + +import org.junit.Test; + +import com.diffplug.spotless.FormatterStep; +import com.diffplug.spotless.ResourceHarness; +import com.diffplug.spotless.generic.LicenseHeaderStep; + +public class CssDefaultsTest extends ResourceHarness { + + @Test + public void testDelimiterExpr() throws Exception { + final String header = "/*My tests header*/"; + FormatterStep step = LicenseHeaderStep.createFromHeader(header, CssDefaults.DELIMITER_EXPR); + final File dummyFile = setFile("src/main/cpp/file1.dummy").toContent(""); + for (String testSource : Arrays.asList( + "/* Starts with element selector */@\np {", + "/* Starts with ID selector */@\n#i {", + "/* Starts with class selector */@\n.i {")) { + String output = null; + try { + output = step.format(testSource, dummyFile); + } catch (IllegalArgumentException e) { + throw new AssertionError(String.format("No delimiter found in '%s'", testSource), e); + } + String expected = testSource.replaceAll("(.*?)\\@", header); + assertThat(output).isEqualTo(expected).as("Unexpected header insertion for '$s'.", testSource); + } + } + +} From 37a486a614301dcb151c77c4d787adfeb1e00044 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 20 Oct 2018 13:59:00 +0200 Subject: [PATCH 2/3] Added missing unit tests for CSS, XML, CPP. --- .../spotless/HasBuiltinDelimiterForLicenseTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/HasBuiltinDelimiterForLicenseTest.java b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/HasBuiltinDelimiterForLicenseTest.java index 04ace06da8..28403f6eef 100644 --- a/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/HasBuiltinDelimiterForLicenseTest.java +++ b/plugin-gradle/src/test/java/com/diffplug/gradle/spotless/HasBuiltinDelimiterForLicenseTest.java @@ -38,6 +38,15 @@ public void testWithCommonInterfaceForConfiguringLicences() throws IOException { " java {", " assert (it instanceof HasBuiltinDelimiterForLicense) : \"Was `$it`\"", " }", + " cpp {", + " assert (it instanceof HasBuiltinDelimiterForLicense) : \"Was `$it`\"", + " }", + " css {", + " assert (it instanceof HasBuiltinDelimiterForLicense) : \"Was `$it`\"", + " }", + " xml {", + " assert (it instanceof HasBuiltinDelimiterForLicense) : \"Was `$it`\"", + " }", "}"); gradleRunner() .withGradleVersion("4.6") From 727f894542fd7e523d8a9c47e041b58eb2f70b90 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 20 Oct 2018 14:00:11 +0200 Subject: [PATCH 3/3] Fixed unrelated typo in XML description. --- lib/src/main/java/com/diffplug/spotless/xml/XmlDefaults.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/com/diffplug/spotless/xml/XmlDefaults.java b/lib/src/main/java/com/diffplug/spotless/xml/XmlDefaults.java index 50da66fc55..249eacc8f1 100644 --- a/lib/src/main/java/com/diffplug/spotless/xml/XmlDefaults.java +++ b/lib/src/main/java/com/diffplug/spotless/xml/XmlDefaults.java @@ -27,7 +27,7 @@ public class XmlDefaults { /** * Filter based on Eclipse-WTP org.eclipse.core.contenttype.contentTypes - * extension org.eclipse.wst.xml.core.xmlsource + * extension org.eclipse.wst.xml.core.xmlsource. */ public static final List FILE_FILTER = Collections.unmodifiableList( Arrays.asList("xml", "xsl", "xslt", "wsdl", "xsd", "exsd", "xmi")