mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Add C++ format check to GitHub Actions (#2554)
This commit is contained in:
parent
c5bc2302eb
commit
96d150a64e
1 changed files with 25 additions and 0 deletions
25
.github/workflows/format-check.yml
vendored
Normal file
25
.github/workflows/format-check.yml
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
name: C++ Format Check
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
cpp-linter:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cpp-linter/cpp-linter-action@v2
|
||||
id: linter
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
style: file
|
||||
files-changed-only: true
|
||||
tidy-checks: '-*'
|
||||
version: '15' # clang-format version
|
||||
file-annotations: true
|
||||
step-summary: true
|
||||
extensions: 'cpp,h'
|
||||
|
||||
- name: Failure Check
|
||||
if: steps.linter.outputs.checks-failed > 0
|
||||
run: echo "Some files failed the formatting check! See job summary and file annotations for more info" && exit 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue