Skip to content

Commit 40cfb85

Browse files
authored
Merge pull request #1041 from bitwiseman/task/eol
Only run spotless:check as part of the lifecyle
2 parents a04ab45 + f08299b commit 40cfb85

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.java text eol=lf

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ We love getting PRs, but we hate asking people for the same basic changes every
77
- [ ] Push your changes to a branch other than `master`. Create your PR from that branch.
88
- [ ] Add JavaDocs and other comments
99
- [ ] Write tests that run and pass in CI. See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to capture snapshot data.
10-
- [ ] Run `mvn clean compile` locally. This may reformat your code, commit those changes.
11-
- [ ] Run `mvn -D enable-ci clean install site` locally. If this command doesn't succeed, your change will not pass CI.
10+
- [ ] Run `mvn -D enable-ci clean install site` locally. If this command doesn't succeed, your change will not pass CI.
1211

1312
# When creating a PR:
1413

pom.xml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
<hamcrest.version>2.2</hamcrest.version>
4040
<okhttp3.version>4.4.1</okhttp3.version>
4141
<okio.version>2.5.0</okio.version>
42-
<spotless-maven-plugin.goal>apply</spotless-maven-plugin.goal>
4342
<!-- Using this as the minimum bar for code coverage. Adding methods without covering them will fail this. -->
4443
<jacoco.coverage.target.bundle.method>0.70</jacoco.coverage.target.bundle.method>
4544
<jacoco.coverage.target.class.method>0.50</jacoco.coverage.target.class.method>
@@ -325,13 +324,14 @@
325324
<plugin>
326325
<groupId>com.diffplug.spotless</groupId>
327326
<artifactId>spotless-maven-plugin</artifactId>
328-
<version>2.7.0</version>
327+
<version>2.8.1</version>
329328
<executions>
330329
<execution>
331330
<id>spotless-check</id>
332-
<phase>process-sources</phase>
331+
<!-- runs in verify phase by default -->
333332
<goals>
334-
<goal>${spotless-maven-plugin.goal}</goal>
333+
<!-- can be disabled using -Dspotless.check.skip=true -->
334+
<goal>check</goal>
335335
</goals>
336336
</execution>
337337
</executions>
@@ -574,7 +574,6 @@
574574
<properties>
575575
<!-- Only fail code coverage on non-windows machines -->
576576
<jacoco.haltOnFailure>true</jacoco.haltOnFailure>
577-
<spotless-maven-plugin.goal>check</spotless-maven-plugin.goal>
578577
</properties>
579578
</profile>
580579
<profile>
@@ -590,14 +589,25 @@
590589
<groupId>org.jacoco</groupId>
591590
<artifactId>jacoco-maven-plugin</artifactId>
592591
</plugin>
592+
<plugin>
593+
<groupId>com.diffplug.spotless</groupId>
594+
<artifactId>spotless-maven-plugin</artifactId>
595+
<executions>
596+
<execution>
597+
<id>spotless-check</id>
598+
<!-- In CI, run check early in the build -->
599+
<phase>process-sources</phase>
600+
<goals>
601+
<goal>check</goal>
602+
</goals>
603+
</execution>
604+
</executions>
605+
</plugin>
593606
</plugins>
594607
</build>
595608
</profile>
596609
<profile>
597610
<id>release</id>
598-
<properties>
599-
<spotless-maven-plugin.goal>check</spotless-maven-plugin.goal>
600-
</properties>
601611
<build>
602612
<plugins>
603613
<plugin>

0 commit comments

Comments
 (0)