blob: 21c51c58b438cafebeda6c89a8b1b58d47262453 [file] [edit]
name: Check format
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- '**.h'
- '**.c'
- 'liblouis/liblouis/liblouis.h.in'
pull_request:
branches: [ master ]
paths:
- '**.h'
- '**.c'
- 'liblouis/liblouis/liblouis.h.in'
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
check-format:
name: Check the code formatting
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install dependencies
run: sudo apt-get update -qq && sudo apt-get install -y clang-format-18
- name: Autogen && configure
run: |
./autogen.sh
./configure
- name: Check format
run: |
make format-sources
git diff-index --exit-code HEAD -- .