Skip to content

Commit df11db1

Browse files
authored
Merge pull request #650 from per1234/shfmt
Standardize formatting of shell code in tasks and workflows
2 parents 5388744 + 7607ad7 commit df11db1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+162
-165
lines changed

.github/workflows/check-clang-format.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ jobs:
7878
run: |
7979
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
8080
if [[ "${{ github.event.inputs.clang-format-version }}" == "" ]]; then
81-
echo "CLANG_FORMAT_VERSION=$(task clang-format:get-version)" >> "$GITHUB_ENV"
81+
echo "CLANG_FORMAT_VERSION=$(task clang-format:get-version)" >>"$GITHUB_ENV"
8282
else
83-
echo "CLANG_FORMAT_VERSION=${{ github.event.inputs.clang-format-version }}" >> "$GITHUB_ENV"
83+
echo "CLANG_FORMAT_VERSION=${{ github.event.inputs.clang-format-version }}" >>"$GITHUB_ENV"
8484
fi
8585
86-
echo "CLANG_FORMAT_INSTALL_PATH=${{ runner.temp }}/clang-format" >> "$GITHUB_ENV"
87-
echo "YQ_INSTALL_PATH=${{ runner.temp }}/yq" >> "$GITHUB_ENV"
88-
echo "WORKING_FOLDER=${{ runner.temp }}" >> "$GITHUB_ENV"
86+
echo "CLANG_FORMAT_INSTALL_PATH=${{ runner.temp }}/clang-format" >>"$GITHUB_ENV"
87+
echo "YQ_INSTALL_PATH=${{ runner.temp }}/yq" >>"$GITHUB_ENV"
88+
echo "WORKING_FOLDER=${{ runner.temp }}" >>"$GITHUB_ENV"
8989
9090
- name: Download ClangFormat
9191
id: download-clang-format
@@ -106,7 +106,7 @@ jobs:
106106
107107
# Add installation to PATH:
108108
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
109-
echo "${{ env.CLANG_FORMAT_INSTALL_PATH }}/clang_Linux_64bit" >> "$GITHUB_PATH"
109+
echo "${{ env.CLANG_FORMAT_INSTALL_PATH }}/clang_Linux_64bit" >>"$GITHUB_PATH"
110110
111111
- name: Download yq
112112
id: download-yq
@@ -126,7 +126,7 @@ jobs:
126126
127127
# Add installation to PATH:
128128
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
129-
echo "${{ env.YQ_INSTALL_PATH }}/yq" >> "$GITHUB_PATH"
129+
echo "${{ env.YQ_INSTALL_PATH }}/yq" >>"$GITHUB_PATH"
130130
131131
- name: Check ClangFormat configuration file
132132
id: check
@@ -164,13 +164,13 @@ jobs:
164164
run: |
165165
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
166166
if [[ "${{ github.event.inputs.clang-format-version }}" == "" ]]; then
167-
echo "CLANG_FORMAT_VERSION=$(task clang-format:get-version)" >> "$GITHUB_ENV"
167+
echo "CLANG_FORMAT_VERSION=$(task clang-format:get-version)" >>"$GITHUB_ENV"
168168
else
169-
echo "CLANG_FORMAT_VERSION=${{ github.event.inputs.clang-format-version }}" >> "$GITHUB_ENV"
169+
echo "CLANG_FORMAT_VERSION=${{ github.event.inputs.clang-format-version }}" >>"$GITHUB_ENV"
170170
fi
171171
172-
echo "CLANG_FORMAT_INSTALL_PATH=${{ runner.temp }}/clang-format" >> "$GITHUB_ENV"
173-
echo "WORKING_FOLDER=${{ runner.temp }}" >> "$GITHUB_ENV"
172+
echo "CLANG_FORMAT_INSTALL_PATH=${{ runner.temp }}/clang-format" >>"$GITHUB_ENV"
173+
echo "WORKING_FOLDER=${{ runner.temp }}" >>"$GITHUB_ENV"
174174
175175
- name: Download ClangFormat
176176
id: download
@@ -191,7 +191,7 @@ jobs:
191191
192192
# Add installation to PATH:
193193
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
194-
echo "${{ env.CLANG_FORMAT_INSTALL_PATH }}/clang_Linux_64bit" >> "$GITHUB_PATH"
194+
echo "${{ env.CLANG_FORMAT_INSTALL_PATH }}/clang_Linux_64bit" >>"$GITHUB_PATH"
195195
196196
- name: Check ClangFormat output
197197
id: check
@@ -239,7 +239,7 @@ jobs:
239239
- name: Set environment variables
240240
run: |
241241
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
242-
echo "CONVERSION_OUTPUT_PATH=${{ runner.temp }}/clang-format-js-object.txt" >> "$GITHUB_ENV"
242+
echo "CONVERSION_OUTPUT_PATH=${{ runner.temp }}/clang-format-js-object.txt" >>"$GITHUB_ENV"
243243
244244
- name: Checkout repository
245245
uses: actions/checkout@v5

.github/workflows/check-files-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
RESULT="false"
3636
fi
3737
38-
echo "result=$RESULT" >> $GITHUB_OUTPUT
38+
echo "result=$RESULT" >>$GITHUB_OUTPUT
3939
4040
check-filenames:
4141
needs: run-determination

.github/workflows/check-general-formatting-task.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
RESULT="false"
3636
fi
3737
38-
echo "result=$RESULT" >> $GITHUB_OUTPUT
38+
echo "result=$RESULT" >>$GITHUB_OUTPUT
3939
4040
check:
4141
needs: run-determination
@@ -48,7 +48,7 @@ jobs:
4848
- name: Set environment variables
4949
run: |
5050
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
51-
echo "EC_INSTALL_PATH=${{ runner.temp }}/editorconfig-checker" >> "$GITHUB_ENV"
51+
echo "EC_INSTALL_PATH=${{ runner.temp }}/editorconfig-checker" >>"$GITHUB_ENV"
5252
5353
- name: Checkout repository
5454
uses: actions/checkout@v5
@@ -83,7 +83,7 @@ jobs:
8383
8484
# Add installation to PATH:
8585
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
86-
echo "${{ env.EC_INSTALL_PATH }}/bin" >> "$GITHUB_PATH"
86+
echo "${{ env.EC_INSTALL_PATH }}/bin" >>"$GITHUB_PATH"
8787
8888
- name: Check formatting
8989
run: |

.github/workflows/check-javascript-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
RESULT="false"
5151
fi
5252
53-
echo "result=$RESULT" >> $GITHUB_OUTPUT
53+
echo "result=$RESULT" >>$GITHUB_OUTPUT
5454
5555
check:
5656
needs: run-determination

.github/workflows/check-license.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
RESULT="false"
5151
fi
5252
53-
echo "result=$RESULT" >> $GITHUB_OUTPUT
53+
echo "result=$RESULT" >>$GITHUB_OUTPUT
5454
5555
check-license:
5656
name: ${{ matrix.check-license.path }}

.github/workflows/check-markdown-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
RESULT="false"
6060
fi
6161
62-
echo "result=$RESULT" >> $GITHUB_OUTPUT
62+
echo "result=$RESULT" >>$GITHUB_OUTPUT
6363
6464
lint:
6565
needs: run-determination

.github/workflows/check-npm-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
RESULT="false"
4848
fi
4949
50-
echo "result=$RESULT" >> $GITHUB_OUTPUT
50+
echo "result=$RESULT" >>$GITHUB_OUTPUT
5151
5252
validate:
5353
name: validate (${{ matrix.project.path }})

.github/workflows/check-poetry-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
RESULT="false"
4545
fi
4646
47-
echo "result=$RESULT" >> $GITHUB_OUTPUT
47+
echo "result=$RESULT" >>$GITHUB_OUTPUT
4848
4949
validate:
5050
needs: run-determination

.github/workflows/check-prettier-formatting-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ jobs:
244244
RESULT="false"
245245
fi
246246
247-
echo "result=$RESULT" >> $GITHUB_OUTPUT
247+
echo "result=$RESULT" >>$GITHUB_OUTPUT
248248
249249
check:
250250
needs: run-determination

.github/workflows/check-python-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
RESULT="false"
5454
fi
5555
56-
echo "result=$RESULT" >> $GITHUB_OUTPUT
56+
echo "result=$RESULT" >>$GITHUB_OUTPUT
5757
5858
lint:
5959
needs: run-determination

0 commit comments

Comments
 (0)