Skip to content

feat: add format check workflow #1

feat: add format check workflow

feat: add format check workflow #1

Workflow file for this run

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