Closed johnboiles closed 3 years ago
See also #4
This patch uses clang-format -i to save the formatted files back to disk instead of returning a diff.
clang-format -i
This should probably be paired with a GitHub action to commit the change (such as EndBug/add-and-commit). Here's an example yml file
EndBug/add-and-commit
name: Run clang-format Linter on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: johnboiles/clang-format-lint-action@inplace with: source: '.' exclude: './lib' extensions: 'h,cpp,c' clangFormatVersion: 11 inplace: True - uses: EndBug/add-and-commit@v4 with: author_name: Clang Robot author_email: robot@example.com message: 'Committing clang-format changes' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Thank you
See also #4
This patch uses
clang-format -i
to save the formatted files back to disk instead of returning a diff.This should probably be paired with a GitHub action to commit the change (such as
EndBug/add-and-commit
). Here's an example yml file