Skip to content

Commit 3f6d578

Browse files
schnellerhasejhale
andauthored
Replace cmake-format with gersemi (#4242)
* Switch from cmake_format to gersemi * Apply gersemi * Blocking gersemi check * Use 2 space indent * And reformat * Add gersemi to lint set * Seems like it's not searching subdirectories * Improve check * Shorten * Annoying that it doesn't do subdirectory search like ruff --------- Co-authored-by: Jack S. Hale <mail@jackhale.co.uk>
1 parent 95405ac commit 3f6d578

12 files changed

Lines changed: 395 additions & 245 deletions

File tree

.gersemirc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
indent: 2

.github/workflows/ccpp.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV
3434

3535
- name: Install linting tools
36-
run: pip install clang-format cmake-format[YAML] mypy ruff
36+
run: pip install clang-format gersemi mypy ruff
3737
- name: ruff .py files in C++ code
3838
run: |
3939
cd cpp/
@@ -60,10 +60,8 @@ jobs:
6060
cd python/dolfinx/wrappers
6161
clang-format --version
6262
find . -type f \( -name "*.cpp" -o -name "*.h" \) | xargs clang-format --dry-run --Werror
63-
- name: cmake-format (non-blocking)
64-
continue-on-error: true
65-
run: |
66-
find . -type f \( -name "*.cmake" -o -name "*.cmake.in" -o -name "CMakeLists.txt" \) | xargs cmake-format --check
63+
- name: gersemi
64+
run: gersemi --check cpp/CMakeLists.txt cpp/dolfinx/CMakeLists.txt python/CMakeLists.txt cpp/cmake/modules/*.cmake cpp/cmake/post-install/CMakeLists.txt cpp/cmake/templates/*.cmake.in
6765

6866
ccpp-build:
6967
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)