-
Notifications
You must be signed in to change notification settings - Fork 371
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
Use upstream Spotless configuration #684
Conversation
More legible (IMO) than #392. I do not believe @bitwiseman remains active in Jenkins. I will ask around to see if anyone claims to maintain this plugin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
introduces a regression
mvn spotless:check
passes on master but fails with this change due to presumably diffplug/spotless#1559
The Windows CI build is fine. https://groups.google.com/g/jenkinsci-dev/c/zUewd9LL5-g/m/PM21Kb0TAQAJ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistent with other repos.
I can help with merging this change into existing branches if needed. |
|
Rough merge instructions FTR git merge 51545c3^
git stash apply
mvn spotless:apply
git checkout HEAD -- pom.xml
gh pr diff --name-only | xargs git add
git commit -m 'Spotless like in #684'
git reset --hard HEAD
git merge -Xours 51545c3
git pull origin master:master with the stash diff --git pom.xml pom.xml
index f1b8ba8..58b01c0 100644
--- pom.xml
+++ pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
- <version>4.16</version>
+ <version>4.61</version>
<relativePath />
</parent>
<artifactId>github-branch-source</artifactId>
@@ -135,63 +135,6 @@
</dependency>
</dependencies>
</dependencyManagement>
- <build>
- <plugins>
- <plugin>
- <groupId>com.diffplug.spotless</groupId>
- <artifactId>spotless-maven-plugin</artifactId>
- <version>2.8.1</version>
- <executions>
- <execution>
- <id>spotless-check</id>
- <!-- runs in verify phase by default -->
- <goals>
- <!-- can be disabled using -Dspotless.check.skip=true -->
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <java>
- <googleJavaFormat>
- <style>GOOGLE</style>
- </googleJavaFormat>
- </java>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <profiles>
- <profile>
- <id>ci-non-windows</id>
- <activation>
- <property>
- <name>set.changelist</name>
- </property>
- <os>
- <family>!windows</family>
- </os>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>com.diffplug.spotless</groupId>
- <artifactId>spotless-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>spotless-check</id>
- <!-- In CI, run check early in the build -->
- <phase>process-sources</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id> |
Now that the upstream plugin parent POM has a formatting profile, I am trying to adapt as many consumers to use it as possible. This repository was an early attempt at automatic formatting that used a different configuration. I do not think anyone is particularly attached to it, and maintenance would be easier moving to our project-wide standard. @jglick Any interest in merging this? I would not be upset if this PR is rejected, but if this repository is to continue using Spotless I think it would benefit from using a more standard configuration. If accepted I will add a
.git-blame-ignore-revs
file after this is merged.