Skip to content

Update clang-format-check #30

Update clang-format-check

Update clang-format-check #30

name: clang-format Check
on:
pull_request:
types: [opened, review_requested, synchronize]
# Only trigger if C source files have been changed.
paths:
- '**.c'
- '**.h'
push:
branches:
- main
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
# Filter only files changed by the PR.
- name: Filter changed files
id: filter
uses: dorny/paths-filter@v2
with:
filters: |
c_files:
- '**.c'
h_files:
- '**.h'
# Check code.
- uses: actions/checkout@v4
- name: Run clang-format style check for C.
if: steps.filter.outputs.c_files == 'true' || steps.filter.outputs.h_files == 'true'
uses: jidicula/clang-format-action@v4.13.0
with:
clang-format-version: '18'
check-path: 'kernel'
fallback-style: llvm