Files
natmap/.github/workflows/code-format.yaml
2025-05-04 08:44:45 +08:00

27 lines
503 B
YAML

name: "Check code formatting"
on:
push:
branches:
- master
pull_request:
jobs:
checker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Prepare
run: |
sudo apt install -y clang-format
- name: Format
run: |
find src -iname "*.[h,c]" -exec clang-format -i {} \;
- name: Check
run: |
git status
git diff --quiet