mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 09:17:57 +00:00
9
.github/workflows/clang-format.yml
vendored
9
.github/workflows/clang-format.yml
vendored
@@ -12,12 +12,17 @@ jobs:
|
|||||||
container: ghcr.io/xrplf/ci/tools-rippled-clang-format
|
container: ghcr.io/xrplf/ci/tools-rippled-clang-format
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Format first-party sources
|
||||||
|
run: |
|
||||||
|
clang-format --version
|
||||||
|
find include src tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format -i {} +
|
||||||
- name: Check for differences
|
- name: Check for differences
|
||||||
id: assert
|
id: assert
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
pwd
|
pwd
|
||||||
ls -a
|
ls -a
|
||||||
|
git config --global --add safe.directory $(pwd)
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
git diff --exit-code | tee "clang-format.patch"
|
git diff --exit-code | tee "clang-format.patch"
|
||||||
- name: Upload patch
|
- name: Upload patch
|
||||||
@@ -28,10 +33,6 @@ jobs:
|
|||||||
name: clang-format.patch
|
name: clang-format.patch
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
path: clang-format.patch
|
path: clang-format.patch
|
||||||
- name: Format first-party sources
|
|
||||||
run: |
|
|
||||||
clang-format --version
|
|
||||||
find include src tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format -i {} +
|
|
||||||
- name: What happened?
|
- name: What happened?
|
||||||
if: failure() && steps.assert.outcome == 'failure'
|
if: failure() && steps.assert.outcome == 'failure'
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user