This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mina-sshd.git
The following commit(s) were added to refs/heads/master by this push: new c258502f2 Validate formatting has been done before CI (#548) c258502f2 is described below commit c258502f220f0580795574a317bd393766336c97 Author: Guillaume Nodet <gno...@gmail.com> AuthorDate: Fri Jul 26 10:05:35 2024 +0200 Validate formatting has been done before CI (#548) --- .github/workflows/build.yml | 2 +- pom.xml | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4c42304f..f9c92ffde 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,7 +52,7 @@ jobs: maven-version: '3.9.8' - name: Build with maven - run: mvn -B --errors --activate-profiles ci --no-transfer-progress package -DskipTests + run: mvn -B --errors --activate-profiles ci,format-check --no-transfer-progress package -DskipTests test: needs: compile diff --git a/pom.xml b/pom.xml index 6583e67a6..c28bdbc83 100644 --- a/pom.xml +++ b/pom.xml @@ -83,6 +83,10 @@ <surefireJdk>[${minimalJavaBuildVersion},)</surefireJdk> <minimalMavenBuildVersion>3.9.8</minimalMavenBuildVersion> + <format.impsort.action>sort</format.impsort.action> + <format.formatter.action>format</format.formatter.action> + + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.outputTimestamp>2024-07-23T13:00:38Z</project.build.outputTimestamp> @@ -133,6 +137,14 @@ </properties> <profiles> + <profile> + <id>format-check</id> + <properties> + <format.impsort.action>check</format.impsort.action> + <format.formatter.action>validate</format.formatter.action> + </properties> + </profile> + <profile> <id>toolchains</id> <activation> @@ -1029,7 +1041,7 @@ <id>format</id> <phase>process-sources</phase> <goals> - <goal>format</goal> + <goal>${format.formatter.action}</goal> </goals> </execution> </executions> @@ -1042,7 +1054,7 @@ <id>sort-imports</id> <phase>process-sources</phase> <goals> - <goal>sort</goal> + <goal>${format.impsort.action}</goal> </goals> </execution> </executions>