Skip to content

Commit

Permalink
Use latest clang format action (#4807)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Sep 5, 2024
1 parent 39361bd commit dae1cc0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: clang-format Check
on:
pull_request:

permissions:
contents: read

jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip-ci')"
steps:
- uses: actions/[email protected]

- name: Run clang-format style check for C and Java code
uses: DoozyX/[email protected]
uses: DoozyX/[email protected].2
with:
source: '.'
extensions: 'c,h,cpp,hpp,java'
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/clang-format-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ name: clang-format Commit Changes
on:
workflow_dispatch:
push:

permissions:
contents: read

jobs:
formatting-check:
name: Commit Format Changes
Expand All @@ -21,16 +23,18 @@ jobs:
permissions:
contents: write # In order to allow EndBug/add-and-commit to commit changes
steps:
- uses: actions/checkout@9a9194f87191a7e9055e3e9b95b8cfb13023bb08 # v4.1.7
- uses: actions/[email protected]

- name: Fix C and Java formatting issues detected by clang-format
uses: DoozyX/clang-format-lint-action@caa179272c6ee7f1d25dfb503ee0c410c26ebd98 # v0.13
uses: DoozyX/clang-format-lint-action@v0.18.2
with:
source: '.'
extensions: 'c,h,cpp,hpp,java'
clangFormatVersion: 13
inplace: True
style: file
exclude: './config ./hl/src/H5LTanalyze.c ./hl/src/H5LTparse.c ./hl/src/H5LTparse.h ./src/H5Epubgen.h ./src/H5Einit.h ./src/H5Eterm.h ./src/H5Edefin.h ./src/H5version.h ./src/H5overflow.h'

- uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
author_name: github-actions
Expand Down

0 comments on commit dae1cc0

Please sign in to comment.