Skip to content

[core] add IDE agnostic configuration thus run spotlessApply on dev environment #1265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .spotless/licence.header
Original file line number Diff line number Diff line change
@@ -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.
*/

7 changes: 5 additions & 2 deletions eclipse_plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format-eclipse-plugin</artifactId>
<packaging>eclipse-plugin</packaging>
<version>1.13.0</version>

<parent>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format-parent</artifactId>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this an issue having SSOT ?

<version>HEAD-SNAPSHOT</version>
</parent>
<name>Google Java Format Plugin for Eclipse 4.5+</name>

<description>
Expand Down
53 changes: 53 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,56 @@
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.4</version>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.44.5</version>
<configuration>
<formats>
<format>
<excludes>
<exclude>**/testdata/**</exclude>
<exclude>**gradlew**</exclude>
<exclude>**mvnw**</exclude>
</excludes>
<includes>
<include>.gitignore</include>
</includes>
<trimTrailingWhitespace/>
</format>
</formats>
<java>
<excludes>
<exclude>**/src/main/java/net/sourceforge/pmd/lang/java/types/package-info.java</exclude>
<exclude>**/testdata/**</exclude>
<exclude>**/unnecessaryimport/package1/U.java</exclude>
</excludes>
<googleJavaFormat/>
<removeUnusedImports/>
<licenseHeader>
<file>${maven.multiModuleProjectDirectory}/.spotless/licence.header</file>
</licenseHeader>
</java>
</configuration>
<executions>
<execution>
<id>spotless-apply</id>
<phase>process-sources</phase>
<goals>
<goal>apply</goal>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disable on CI

</goals>
</execution>
<execution>
<id>spotless-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

</pluginManagement>

<plugins>
Expand Down Expand Up @@ -295,6 +344,10 @@
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down