Skip to content

change clang-format to version 14 #10

change clang-format to version 14

change clang-format to version 14 #10

Workflow file for this run

name: Clang Format Diff
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: install clang-format
run: |
sudo apt install -y clang-format
clang-format --version
- 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