-
Notifications
You must be signed in to change notification settings - Fork 572
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12058 from GrahamBenHarper/muelu_clangd_format
MueLu: Add clang-format workflow and run it on MueLu
- Loading branch information
Showing
945 changed files
with
140,395 additions
and
144,256 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Check MueLu clang-format | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: DoozyX/[email protected] | ||
with: | ||
source: './packages/muelu' | ||
exclude: '' | ||
extensions: 'cpp,hpp' | ||
clangFormatVersion: 14 | ||
inplace: true | ||
- run: git diff HEAD > format_patch.txt | ||
- run: if [ "$(cat format_patch.txt)" == "" ] ; then rm format_patch.txt ; fi | ||
- uses: actions/upload-artifact@v3 | ||
if: ${{ hashFiles('format_patch.txt') != '' }} | ||
with: | ||
name: MueLu format patch | ||
path: format_patch.txt | ||
- uses: actions/github-script@v3 | ||
if: ${{ hashFiles('format_patch.txt') != '' }} | ||
with: | ||
script: | | ||
core.setFailed('Please download and apply the formatting patch! It is located at the bottom of the summary tab for this workflow.') |
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,13 @@ | ||
#Official Tool: clang-format version 14.0.0 | ||
#Kokkos options | ||
BasedOnStyle: google | ||
SortIncludes: false | ||
AlignConsecutiveAssignments: true | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AllowShortIfStatementsOnASingleLine: true | ||
#MueLu-specific options | ||
ColumnLimit: 0 | ||
BreakConstructorInitializersBeforeComma: true | ||
BreakConstructorInitializers: BeforeComma | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: false | ||
ConstructorInitializerIndentWidth: 2 |
Oops, something went wrong.