Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 24 additions & 14 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
name: clang-format check
name: clang-format pr

on:
pull_request:
branches: [ develop ]
push:
branches: [ develop ]
branches:
- develop
- master

jobs:
clang_format_check:
runs-on: ubuntu-latest

defaults:
run:
shell: bash
clang_format_pr:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Run clang-format on diff
run: ./Support/Scripts/run_clang_format_diff.sh HEAD^ HEAD
fetch-depth: 2
- name: Add Problem Matcher
uses: ammaraskar/gcc-problem-matcher@a141586609e2a558729b99a8c574c048f7f56204
- name: Check Formatting
id: check_format
continue-on-error: true
run: |
python3 scripts/clang_format.py --format-version 15 --commits HEAD^ HEAD
- name: Apply Formatting
if: steps.check_format.outcome != 'success'
run: |
python3 scripts/clang_format.py --format-version 15 --modify --commits HEAD^ HEAD
- name: Add Suggestions
if: steps.check_format.outcome != 'success'
uses: reviewdog/action-suggester@v1
with:
tool_name: clang-format
fail_level: error
Loading