blob: 4156096fc24c0b179f1db7f3dd4e8da127ae775f [file]
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@a90bcbc6539c36a85cdfeb73f7e2f433735f215b # v2.15.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- 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 -- .