Skip to content

Commit

Permalink
pre-commit - replace cmake-format/cmake-lint with gersemi
Browse files Browse the repository at this point in the history
gersemi <https://github.com/BlankSpruce/gersemi> seems to do a
better job than cmake-format, plus it is actively supported.
  • Loading branch information
winterz committed Dec 15, 2024
1 parent 37409de commit d467166
Show file tree
Hide file tree
Showing 31 changed files with 1,802 additions and 1,157 deletions.
240 changes: 0 additions & 240 deletions .cmake-format.py

This file was deleted.

4 changes: 4 additions & 0 deletions .gersemirc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
definitions: [./cmake,./src/test,./docs]
indent: 2
line_length: 120
list_expansion: favour-expansion
1 change: 0 additions & 1 deletion .krazy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ EXTRA crud,camelcase

#For now skip java
SKIP /java/
SKIP \.cmake-format\.py
#For now skip perl
SKIP /Net-ICal-Libical/

Expand Down
10 changes: 3 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,17 @@ repos:
hooks:
# Run the linter.
- id: ruff
exclude: ^(.cmake-format.py)
# Run the formatter.
- id: ruff-format
exclude: ^(.cmake-format.py)
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
exclude: ^(CONTRIBUTORS.md)
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.17.1
hooks:
- id: cmake-lint
exclude: (cmake/Toolchain-|.h.cmake|/Doxyfile.cmake)
- id: cmake-format
- id: gersemi
exclude: (cmake/Toolchain-|.h.cmake|/Doxyfile.cmake)
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.15.0
Expand Down
Loading

0 comments on commit d467166

Please sign in to comment.