Skip to content

Add format check using a fork #17

Add format check using a fork

Add format check using a fork #17

name: clang-format Check
on: [push, pull_request]
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Project Name
run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
- name: Run clang-format style check on implementation files.
uses: mrousavy/clang-format-action@v1
with:
clang-format-version: '17'
check-path: 'src'
clang-format-style-path: .clang-format
- name: Run clang-format style check on header files.
uses: mrousavy/clang-format-action@v1
with:
clang-format-version: '17'
check-path: 'include'
clang-format-style-path: .clang-format
- name: Run clang-format style check on test files.
uses: mrousavy/clang-format-action@v1
with:
clang-format-version: '17'
check-path: 'test'
clang-format-style-path: .clang-format