Skip to content

Commit 21f2da8

Browse files
author
Soren Ptak
committed
Don't remove trailing whitespace for patches, lib, or archive files
1 parent dda3142 commit 21f2da8

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

.github/workflows/formattingTests.yml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,47 +16,47 @@ env:
1616

1717
jobs:
1818
uncrustify-formatting-success-cases:
19-
runs-on: ubuntu-20.04
20-
steps:
21-
- uses: actions/checkout@v3
19+
runs-on: ubuntu-20.04
20+
steps:
21+
- uses: actions/checkout@v3
2222

23-
- env:
24-
stepName: "Functional | Success | Exclude Files and Dirs"
25-
name: ${{ env.stepName }}
26-
id: exclude-dirs-with-errors
27-
uses: ./formatting
28-
with:
29-
path: formatting/goodFiles
30-
exclude-dirs: "fileWithErrorInclude, fileWithErrorSource"
31-
exclude-files: "formatErrorTest.h, formatErrorTest.c"
23+
- env:
24+
stepName: "Functional | Success | Exclude Files and Dirs"
25+
name: ${{ env.stepName }}
26+
id: exclude-dirs-with-errors
27+
uses: ./formatting
28+
with:
29+
path: formatting/goodFiles
30+
exclude-dirs: "fileWithErrorInclude, fileWithErrorSource"
31+
exclude-files: "formatErrorTest.h, formatErrorTest.c"
3232

33-
- env:
34-
stepName: "Functional | Success | Exclude Just Files"
35-
name: ${{ env.stepName }}
36-
id: exclude-files-with-errors
37-
uses: ./formatting
38-
with:
39-
path: formatting/goodFiles
40-
exclude-dirs: ",,,"
41-
exclude-files: "errorFileInDirectory.h, formatErrorTest.h, errorFileInDirectory.c, formatErrorTest.c"
33+
- env:
34+
stepName: "Functional | Success | Exclude Just Files"
35+
name: ${{ env.stepName }}
36+
id: exclude-files-with-errors
37+
uses: ./formatting
38+
with:
39+
path: formatting/goodFiles
40+
exclude-dirs: ",,,"
41+
exclude-files: "errorFileInDirectory.h, formatErrorTest.h, errorFileInDirectory.c, formatErrorTest.c"
4242

43-
- name: Remove Error Files at Top Directory
44-
working-directory: formatting/goodFiles
45-
shell: bash
46-
run: |
47-
# Remove Error Files at Top Directory
48-
# Do a git remove since we use a git diff to check if formatting fails
49-
git rm $(find . -name "formatErrorTest.c")
50-
git rm $(find . -name "formatErrorTest.h")
43+
- name: Remove Error Files at Top Directory
44+
working-directory: formatting/goodFiles
45+
shell: bash
46+
run: |
47+
# Remove Error Files at Top Directory
48+
# Do a git remove since we use a git diff to check if formatting fails
49+
git rm $(find . -name "formatErrorTest.c")
50+
git rm $(find . -name "formatErrorTest.h")
5151
52-
- env:
53-
stepName: "Functional | Success | Exclude Just Error Dirs"
54-
name: ${{ env.stepName }}
55-
id: exclude-two-files-two-dirs
56-
uses: ./formatting
57-
with:
58-
path: formatting/goodFiles
59-
exclude-dirs: "fileWithErrorInclude, fileWithErrorSource"
52+
- env:
53+
stepName: "Functional | Success | Exclude Just Error Dirs"
54+
name: ${{ env.stepName }}
55+
id: exclude-two-files-two-dirs
56+
uses: ./formatting
57+
with:
58+
path: formatting/goodFiles
59+
exclude-dirs: "fileWithErrorInclude, fileWithErrorSource"
6060

6161
formatting-error-cases:
6262
runs-on: ubuntu-20.04

formatting/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ runs:
102102
103103
# Replace all trailing whitespace, exclude photo and binary files
104104
echo -e "::group::${{ env.bashInfo }} Check for Trailing Whitespace ${{ env.bashEnd }}"
105-
echo -e "${{ env.bashInfo }} Running: fdfind --type=file -E '*.png' -E '*.jpg' -E '*.svg' -E '.a' -E '.lib' ${args} . --exec sed -Ei 's/[[:blank:]]+$//' ${{ env.bashEnd }}"
106-
fdfind --type=file -E '*.png' -E '*.jpg' -E '*.svg' -E '.a' -E '.lib' ${args} . --exec sed -Ei 's/[[:blank:]]+$//'
105+
echo -e "${{ env.bashInfo }} Running: fdfind --type=file -E '*.png' -E '*.jpg' -E '*.svg' -E '*.a' -E '*.lib' -E '*.patch' ${args} . --exec sed -Ei 's/[[:blank:]]+$//' ${{ env.bashEnd }}"
106+
fdfind --type=file -E '*.png' -E '*.jpg' -E '*.svg' -E '*.a' -E '*.lib' -E '*.patch' ${args} . --exec sed -Ei 's/[[:blank:]]+$//'
107107
108108
# Replace all line endings with LF ones instead of CRLF
109109
echo -e "::group::${{ env.bashInfo }} Check for CRLF Line Endings ${{ env.bashEnd }}"

0 commit comments

Comments
 (0)