Skip to content

Add reuse lint

Add reuse lint #7

Workflow file for this run

name: clang-format
on:
- push
jobs:
clang-format:
name: clang-format
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: apt-get
run: |
sudo apt-get update
sudo apt-get -y install python3 python3-pip
# fix version here for now
pip3 install clang-format==18.1.5
- name: run-clang-format
run: |
set -euo pipefail
clang-format --version
which clang-format
# cf. https://stackoverflow.com/a/36046965
find ./ -iname '*.h' | xargs clang-format -i
find tests/ -iname '*.h' | xargs clang-format -i
git diff > formatting.patch
cat formatting.patch
if [ -s ./formatting.patch ]; then (exit 1); fi