This project can be used to run clang-format on every push using Github actions. Uses Microsoft codestyle by default.
For a more detailed installation guide look there
Create a formatter.yml
file in .github/workflows/
.
Paste this code into the file:
on: push
name: clang-format Code Formatter
jobs:
lint:
name: clang-format Code Formatter
runs-on: ubuntu-latest
steps:
- name: Clang Code Formatter
uses: ivanludvig/clang-format-action@v1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}