-
-
Save ei1333/fc493e4465de9018b71bf6b581c94309 to your computer and use it in GitHub Desktop.
format.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: clang-format | |
| on: | |
| pull_request: | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ github.ref }} | |
| - name: install tools | |
| run: | | |
| sudo wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - 2>/dev/null | |
| sudo add-apt-repository "deb http://apt.llvm.org/`lsb_release -sc`/ llvm-toolchain-`lsb_release -sc` main" 2>/dev/null | |
| sudo apt-get update | |
| sudo apt-get install clang-format-16 | |
| - name: apply formatter | |
| run: | | |
| clang-format-16 --dry-run --Werror $(find . -name "*.hpp" -or -name "*.cpp") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment