Skip to content

Commit

Permalink
chore: intro editorconfig-maven-plugin for verifying code style def…
Browse files Browse the repository at this point in the history
…ined in `.editorconfig` (#2591)

* exclude .flattened-pom.xml
  • Loading branch information
VGalaxies authored Jul 17, 2024
1 parent d6bc24e commit 73a4c9d
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 20 deletions.
12 changes: 6 additions & 6 deletions hugegraph-server/hugegraph-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@
<artifactId>arthas-packaging</artifactId>
<version>${arthas.version}</version>
</dependency>
<dependency>
<groupId>org.gridkit.jvmtool</groupId>
<artifactId>sjk-core</artifactId>
<version>0.22</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.gridkit.jvmtool</groupId>
<artifactId>sjk-core</artifactId>
<version>0.22</version>
<scope>compile</scope>
</dependency>
</dependencies>

<build>
Expand Down
14 changes: 0 additions & 14 deletions hugegraph-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -273,20 +273,6 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<compilerArguments>
<Xmaxerrs>500</Xmaxerrs>
</compilerArguments>
<compilerArgs>
<arg>-Xlint:unchecked</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
Expand Down
44 changes: 44 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,23 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<compilerArguments>
<Xmaxerrs>500</Xmaxerrs>
</compilerArguments>
<compilerArgs>
<arg>-Xlint:unchecked</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.rat</groupId>
Expand All @@ -235,6 +250,35 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.ec4j.maven</groupId>
<artifactId>editorconfig-maven-plugin</artifactId>
<version>0.1.3</version>
<executions>
<execution>
<id>style-check</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
<configuration>
<!-- See http://ec4j.github.io/editorconfig-maven-plugin/ for full configuration reference -->
<excludes>
<!-- Note that maven submodule directories and many non-source file patterns are excluded by default -->
<!-- see https://github.com/ec4j/editorconfig-linters/blob/master/editorconfig-lint-api/src/main/java/org/ec4j/lint/api/Constants.java#L37 -->
<!-- You can exclude further files from processing: -->
<exclude>**/*.txt</exclude>
<exclude>**/.flattened-pom.xml</exclude>
</excludes>
<!-- All files are included by default:
<includes>
<include>**</include>
</includes>
-->
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 73a4c9d

Please sign in to comment.