mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-04 05:44:53 +00:00
* Add .clang-format * Add clang-format github action * Set more explicit name to GitHub workflow Co-Authored-By: Willem <github@canihavesome.coffee> Co-authored-by: Willem <github@canihavesome.coffee>
17 lines
592 B
YAML
17 lines
592 B
YAML
name: Format sourcecode
|
|
on: [push, pull_request]
|
|
jobs:
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Install dependencies
|
|
run: |
|
|
curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
|
sudo add-apt-repository -y 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
|
|
sudo apt install clang-format-9
|
|
- name: Format code
|
|
run: |
|
|
find src/ -type f -name '*.c' -name '*.c' | xargs clang-format-9 -i
|
|
git diff-index --quiet HEAD -- || (git diff && exit 1)
|