ccextractor/.github/workflows/format.yml
Willem 1aed90e42c
[IMPROVEMENT] Apply clang-format to all remaining files (#1247)
Apply clang-format to all files aside from the icon file in the GUI and modify the action appropriately.
2020-03-29 22:16:39 +02:00

23 lines
550 B
YAML

name: Format sourcecode
on:
push:
paths:
- '.github/workflows/format.yml'
- 'src/**.c'
- 'src/**.h'
pull_request:
types: [opened, synchronize, reopened]
paths:
- '.github/workflows/format.yml'
- 'src/**.c'
- 'src/**.h'
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Format code
run: |
find src/ -type f -name '*.c' -not -path "src/GUI/icon_data.c" | xargs clang-format -i
git diff-index --quiet HEAD -- || (git diff && exit 1)