Skip to content

Add PULL_REQUEST_TEMPLATE.md #14

Add PULL_REQUEST_TEMPLATE.md

Add PULL_REQUEST_TEMPLATE.md #14

Workflow file for this run

# Clang-format workflow
# Github: https://www.github.com/awesomelewis2007/workflows
# By: Lewis Evans
name: Clang-format
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
python-black:
name: Format code using clang-format
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install clang-format
- name: Git pull
run: |
git pull
- name: Format C code
run: |
find . -type f -name "*.c" -exec clang-format {} -i -style="{IndentWidth: 4}" \;
- name: Format C++ code
run: |
find . -type f -name "*.cpp" -exec clang-format {} -i -style="{IndentWidth: 4}" \;
- name: Format C header code
run: |
find . -type f -name "*.h" -exec clang-format {} -i -style="{IndentWidth: 4}" \;
- name: Format C++ header code
run: |
find . -type f -name "*.hpp" -exec clang-format {} -i -style="{IndentWidth: 4}" \;
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Format C/C++ code with clang-format"