From 60e09f22ed6aa6662b84b67455a11a75791c336b Mon Sep 17 00:00:00 2001 From: Vincent Potucek Date: Fri, 27 Jun 2025 23:31:15 +0200 Subject: [PATCH] [core] add IDE agnostic configuration thus run spotlessApply on dev environment --- .spotless/licence.header | 14 +++++++++++ eclipse_plugin/pom.xml | 7 ++++-- pom.xml | 53 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 .spotless/licence.header diff --git a/.spotless/licence.header b/.spotless/licence.header new file mode 100644 index 000000000..919c7ad50 --- /dev/null +++ b/.spotless/licence.header @@ -0,0 +1,14 @@ +/* + * Copyright $YEAR Google Inc. + * + * 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. + */ + diff --git a/eclipse_plugin/pom.xml b/eclipse_plugin/pom.xml index b2c6e368a..2fb5af5e6 100644 --- a/eclipse_plugin/pom.xml +++ b/eclipse_plugin/pom.xml @@ -19,11 +19,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.google.googlejavaformat google-java-format-eclipse-plugin eclipse-plugin 1.13.0 - + + com.google.googlejavaformat + google-java-format-parent + HEAD-SNAPSHOT + Google Java Format Plugin for Eclipse 4.5+ diff --git a/pom.xml b/pom.xml index 46ccad473..79819b91f 100644 --- a/pom.xml +++ b/pom.xml @@ -183,7 +183,56 @@ maven-bundle-plugin 5.1.4 + + com.diffplug.spotless + spotless-maven-plugin + 2.44.5 + + + + + **/testdata/** + **gradlew** + **mvnw** + + + .gitignore + + + + + + + **/src/main/java/net/sourceforge/pmd/lang/java/types/package-info.java + **/testdata/** + **/unnecessaryimport/package1/U.java + + + + + ${maven.multiModuleProjectDirectory}/.spotless/licence.header + + + + + + spotless-apply + process-sources + + apply + + + + spotless-check + verify + + check + + + + + @@ -295,6 +344,10 @@ + + com.diffplug.spotless + spotless-maven-plugin +