Skip to content

Commit

Permalink
Run clang-format and cmake-format on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-ballarin committed Nov 27, 2023
1 parent 7c71e8d commit 50ec1be
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ jobs:
- name: Run yamllint on workflows
run: |
python3 -m yamllint -d "{extends: default, rules: {document-start: {present: false}, line-length: disable, truthy: {check-keys: false}}}" .
- name: Run clang-format on C++ files
run: |
wget https://raw.githubusercontent.com/FEniCS/dolfinx/main/.clang-format
find . -type f \( -name "*.cpp" -o -name "*.h" \) | xargs clang-format --dry-run --Werror
- name: Run cmake-format on cmake files
run: |
wget https://raw.githubusercontent.com/FEniCS/dolfinx/main/.cmake-format
find . -type f \( -name "*.cmake" -o -name "*.cmake.in" -o -name "CMakeLists.txt" \) | xargs cmake-format --check
- name: Run documentation generation
if: startsWith(matrix.backend, 'none') != true
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
*.nbi
*.py[cod]
*.xdmf
.clang-format
.cmake-format
.coverage*
.eggs
.pytest_cache
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ docs = [
"sphinx"
]
lint = [
"clang-format",
"cmakelang",
"isort",
"mypy",
"ruff",
Expand Down

0 comments on commit 50ec1be

Please sign in to comment.