Skip to content

Commit 484dfa9

Browse files
Godinmarchof
authored andcommitted
Check code formatting during build (bazel-contrib#956)
1 parent a743695 commit 484dfa9

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
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

org.jacoco.build/pom.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,11 @@
474474
<artifactId>maven-bundle-plugin</artifactId>
475475
<version>3.5.1</version>
476476
</plugin>
477+
<plugin>
478+
<groupId>com.diffplug.spotless</groupId>
479+
<artifactId>spotless-maven-plugin</artifactId>
480+
<version>1.24.3</version>
481+
</plugin>
477482
</plugins>
478483
</pluginManagement>
479484

@@ -553,6 +558,31 @@
553558
</executions>
554559
</plugin>
555560

561+
<plugin>
562+
<groupId>com.diffplug.spotless</groupId>
563+
<artifactId>spotless-maven-plugin</artifactId>
564+
<configuration>
565+
<java>
566+
<lineEndings>UNIX</lineEndings>
567+
<includes>
568+
<include>src/**/*.java</include>
569+
</includes>
570+
<eclipse>
571+
<version>4.12.0</version>
572+
<file>../org.jacoco.core/.settings/org.eclipse.jdt.core.prefs</file>
573+
</eclipse>
574+
</java>
575+
</configuration>
576+
<executions>
577+
<execution>
578+
<phase>prepare-package</phase>
579+
<goals>
580+
<goal>check</goal>
581+
</goals>
582+
</execution>
583+
</executions>
584+
</plugin>
585+
556586
<plugin>
557587
<groupId>org.apache.maven.plugins</groupId>
558588
<artifactId>maven-antrun-plugin</artifactId>

0 commit comments

Comments
 (0)