-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force C/C++ code to be formatted by GitHub Actions (#158)
* Remove extra .clang-format * Use better clang-format settings. * 🤖 apply linter changes (will not trigger CI) * Only operate in-place if we can push the result. * Fix templated macros.
- Loading branch information
1 parent
f5694b9
commit 287f16b
Showing
19 changed files
with
303 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
--- | ||
BasedOnStyle: LLVM | ||
AlignAfterOpenBracket: DontAlign | ||
SpacesBeforeTrailingComments: 2 | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
AlignAfterOpenBracket: DontAlign | ||
AlwaysBreakTemplateDeclarations: Yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- uses: DoozyX/clang-format-lint-action@v0.13 | ||
with: | ||
source: '.' | ||
exclude: './dependencies ./tests/gemmini/gemmini-rocc-tests' | ||
clangFormatVersion: 12 | ||
inplace: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | ||
# Only push to internal PRs | ||
- uses: EndBug/add-and-commit@v4 | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
with: | ||
message: '🤖 apply linter changes (will not trigger CI)' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.