mirror of
https://github.com/fmtlib/fmt.git
synced 2026-04-30 19:09:22 +08:00
Add cmake-format job
This commit is contained in:
parent
ae6fd83e2e
commit
7733f4c136
18
.github/workflows/lint.yml
vendored
18
.github/workflows/lint.yml
vendored
@ -5,12 +5,14 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- '**.h'
|
- '**.h'
|
||||||
- '**.cc'
|
- '**.cc'
|
||||||
|
- '**.cmake'
|
||||||
|
- '**/CMakeLists.txt'
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format_code:
|
clang-format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
@ -26,3 +28,17 @@ jobs:
|
|||||||
find include src -name '*.h' -o -name '*.cc' | \
|
find include src -name '*.h' -o -name '*.cc' | \
|
||||||
xargs clang-format-21 -i -style=file -fallback-style=none
|
xargs clang-format-21 -i -style=file -fallback-style=none
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
|
|
||||||
|
cmake-format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
|
||||||
|
|
||||||
|
- name: Install cmake-format
|
||||||
|
run: pip install cmakelang
|
||||||
|
|
||||||
|
- name: Run cmake-format
|
||||||
|
run: |
|
||||||
|
find . -name CMakeLists.txt -o -name '*.cmake' | \
|
||||||
|
xargs cmake-format -i
|
||||||
|
git diff --exit-code
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user