Skip to content

Build, CI: set up code formatting infrastructure #14

Build, CI: set up code formatting infrastructure

Build, CI: set up code formatting infrastructure #14

Workflow file for this run

name: Linting
on:
workflow_dispatch:
pull_request:
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- name: Clone tntcxx
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup clang-format
run: sudo apt install -y clang-format
shell: bash
- name: Run clang-format
run: >
# Run clang-format on commits off the base branch of the pull request.
if git clang-format origin/${{ github.event.pull_request.base.ref }} --diff -q; then
echo Code formatting changed some files, please review.
exit 1
fi
shell: bash