mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Update clang-format workflow
This commit is contained in:
10
.github/workflows/clang-format.yml
vendored
10
.github/workflows/clang-format.yml
vendored
@@ -4,9 +4,9 @@ on: [push, pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-24.04
|
||||||
env:
|
env:
|
||||||
CLANG_VERSION: 10
|
CLANG_VERSION: 18
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install clang-format
|
- name: Install clang-format
|
||||||
@@ -19,8 +19,8 @@ jobs:
|
|||||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install clang-format-${CLANG_VERSION}
|
sudo apt-get install clang-format-${CLANG_VERSION}
|
||||||
- name: Format sources
|
- name: Format first-party sources
|
||||||
run: find include src -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format-${CLANG_VERSION} -i {} +
|
run: find include src -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format-${CLANG_VERSION} -i {} +
|
||||||
- name: Check for differences
|
- name: Check for differences
|
||||||
id: assert
|
id: assert
|
||||||
run: |
|
run: |
|
||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
To fix it, you can do one of two things:
|
To fix it, you can do one of two things:
|
||||||
1. Download and apply the patch generated as an artifact of this
|
1. Download and apply the patch generated as an artifact of this
|
||||||
job to your repo, commit, and push.
|
job to your repo, commit, and push.
|
||||||
2. Run 'git-clang-format --extensions c,cpp,h,cxx,ipp develop'
|
2. Run 'git-clang-format --extensions cpp,h,hpp,ipp develop'
|
||||||
in your repo, commit, and push.
|
in your repo, commit, and push.
|
||||||
run: |
|
run: |
|
||||||
echo "${PREAMBLE}"
|
echo "${PREAMBLE}"
|
||||||
|
|||||||
Reference in New Issue
Block a user