You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by to...@apache.org on 2022/10/27 18:59:32 UTC

[db-jdo] branch main updated (4a2eb293 -> d4eedf72)

This is an automated email from the ASF dual-hosted git repository.

tobous pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/db-jdo.git


    from 4a2eb293 Format Java classes using GJF
     new 04051f0a Adjust README formatter section
     new d4eedf72 Introduce format check in GitHub action

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/build.yml | 15 +++++++++++++++
 README.md                   | 10 ++++++++++
 parent-pom/pom.xml          |  2 +-
 3 files changed, 26 insertions(+), 1 deletion(-)


[db-jdo] 02/02: Introduce format check in GitHub action

Posted by to...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tobous pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/db-jdo.git

commit d4eedf726b16950975334356a128b00aced587ea
Author: Tobias Bouschen <to...@googlemail.com>
AuthorDate: Thu Oct 20 17:56:31 2022 +0200

    Introduce format check in GitHub action
    
    The check is always run before the build. The TCK is still run if the
    formatting check fails.
---
 .github/workflows/build.yml | 15 +++++++++++++++
 README.md                   |  4 ++++
 parent-pom/pom.xml          |  2 +-
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c31b939d..7b631ab6 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -27,8 +27,23 @@ on:
   pull_request:
 
 jobs:
+  format-check:
+    name: Check Code Formatting
+    continue-on-error: true
+    runs-on: ubuntu-latest
+    steps:
+    - name: Checkout
+      uses: actions/checkout@v2
+      with:
+        fetch-depth: 1
+    - name: Check Format
+      run: |
+        mvn -Pverify-format clean compile
+      shell: 'bash'
+
   build-jdo:
     name: Build JDO & Run TCK
+    needs: format-check
     runs-on: ubuntu-latest
     strategy:
       matrix:
diff --git a/README.md b/README.md
index d0ef390c..facd6a10 100644
--- a/README.md
+++ b/README.md
@@ -183,3 +183,7 @@ There are two profiles to support code formatting using the maven fmt-maven-plug
 * `format` reformats the project's Java files.
 
         mvn -Pformat clean compile
+
+#### GitHub Action Integration
+
+The formatting of the code is checked automatically through the GitHub actions for every PR and/or push on master.
diff --git a/parent-pom/pom.xml b/parent-pom/pom.xml
index 3197f6c2..6f25ea31 100644
--- a/parent-pom/pom.xml
+++ b/parent-pom/pom.xml
@@ -436,7 +436,7 @@
                         <configuration>
                             <displayLimit>1000</displayLimit>
                             <verbose>true</verbose>
-                            <failOnError>false</failOnError>
+                            <failOnError>true</failOnError>
                         </configuration>
                         <executions>
                             <execution>


[db-jdo] 01/02: Adjust README formatter section

Posted by to...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tobous pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/db-jdo.git

commit 04051f0ad93e5994e84646c20a39675f7a61dad2
Author: Tobias Bouschen <to...@googlemail.com>
AuthorDate: Thu Oct 20 17:48:44 2022 +0200

    Adjust README formatter section
---
 README.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/README.md b/README.md
index e904b2a3..d0ef390c 100644
--- a/README.md
+++ b/README.md
@@ -168,6 +168,12 @@ You can pass different compiler arguments using the -D option:
 The JDO project uses the google-java-format for checking and reformatting the Java code to comply with 
 Google Java Style [Google Java Style](https://google.github.io/styleguide/javaguide.html). 
 
+The code is formatted using the [Google Java Format](https://github.com/google/google-java-format) tool.
+The formatter can be run in the command line or can be integrated into IntelliJ or Eclipse as a plugin.
+More information on this is given in the [GJF README](https://github.com/google/google-java-format#using-the-formatter).
+
+#### Formatting using Maven
+
 There are two profiles to support code formatting using the maven fmt-maven-plugin.
 
 * `verify-format` checks the formatting of the project's Java files. It prints the list of the files that are not compliant.