Skip to content

Commit

Permalink
feat: add format check workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
WhySoBad committed Nov 21, 2024
1 parent 863acc3 commit b7d01f8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Check code formatting

on:
push:
workflow_dispatch:

jobs:
clang_format:
name: 'Check code formatting'
runs-on: ubuntu-latest
container:
image: archlinux
steps:
- name: Checkout repository action
uses: actions/checkout@v4
with:
sparse-checkout: .github/actions

- name: Install clang
shell: bash
run:
sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf
pacman --noconfirm --noprogressbar -Syyu
pacman --noconfirm --noprogressbar -Sy clang

- name: Run clang-format
shell: bash
run: clang-format --dry-run --Werror */**.{h,c}pp

0 comments on commit b7d01f8

Please sign in to comment.