Skip to content

Merge pull request #290 from 171930433/gsk/add_const #665

Merge pull request #290 from 171930433/gsk/add_const

Merge pull request #290 from 171930433/gsk/add_const #665

Workflow file for this run

name: Clang Format Diff
on:
push:
branches: [ master, struct_pb ]
pull_request:
branches: [ master, struct_pb ]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: install clang-format
run: sudo apt install clang-format
- name: check-diff
run : |
diff=`git-clang-format --diff HEAD^`
if ! [[ "$diff" = "no modified files to format" || "$diff" = "clang-format did not modify any files" ]]; then
echo "The diff you sent is not formatted correctly."
echo "the suggested format is"
echo "$diff"
exit 1
fi