Skip to content

Commit ec3b935

Browse files
committed
Standardize formatting of shell code in tasks and workflows
Shell scripts in Arduino tooling projects are formatted according to the style implemented by the shfmt formatting tool. In addition to standalone script files, significant quantities of complex shell code is also found in the asset tasks and workflows. shfmt can not be used to format this code (both due to the fact it is in the form of strings in YAML documents, and due to the fact that it is actually templates of shell code (making use of the templating features of Task and GitHub Actions) rather than complete shell code). However, it still makes sense to align the formatting of this code with the standardized shell code style where doing so is feasible.
1 parent 1c98b61 commit ec3b935

20 files changed

+42
-43
lines changed

.github/workflows/check-certificates.yml

Lines changed: 3 additions & 3 deletions
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
check-certificates:
6565
name: ${{ matrix.certificate.identifier }}
@@ -82,7 +82,7 @@ jobs:
8282
- name: Set certificate path environment variable
8383
run: |
8484
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
85-
echo "CERTIFICATE_PATH=${{ runner.temp }}/certificate.p12" >> "$GITHUB_ENV"
85+
echo "CERTIFICATE_PATH=${{ runner.temp }}/certificate.p12" >>"$GITHUB_ENV"
8686
8787
- name: Decode certificate
8888
env:
@@ -166,7 +166,7 @@ jobs:
166166
echo "Certificate expiration date: $EXPIRATION_DATE"
167167
echo "Days remaining before expiration: $DAYS_BEFORE_EXPIRATION"
168168
169-
echo "days=$DAYS_BEFORE_EXPIRATION" >> $GITHUB_OUTPUT
169+
echo "days=$DAYS_BEFORE_EXPIRATION" >>$GITHUB_OUTPUT
170170
171171
- name: Check if expiration notification period has been reached
172172
id: check-expiration

.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
@@ -76,7 +76,7 @@ jobs:
7676
mv "${{ env.EC_INSTALL_PATH }}/bin/ec-linux-amd64" "${{ env.EC_INSTALL_PATH }}/bin/ec"
7777
# Add installation to PATH:
7878
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
79-
echo "${{ env.EC_INSTALL_PATH }}/bin" >> "$GITHUB_PATH"
79+
echo "${{ env.EC_INSTALL_PATH }}/bin" >>"$GITHUB_PATH"
8080
8181
- name: Check formatting
8282
run: task --silent general:check-formatting

.github/workflows/check-go-dependencies-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
check-cache:
5959
needs: run-determination

.github/workflows/check-go-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
check-errors:
5353
name: check-errors (${{ matrix.module.path }})

.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
@@ -63,7 +63,7 @@ jobs:
6363
RESULT="false"
6464
fi
6565
66-
echo "result=$RESULT" >> $GITHUB_OUTPUT
66+
echo "result=$RESULT" >>$GITHUB_OUTPUT
6767
6868
lint:
6969
needs: run-determination

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
RESULT="false"
6666
fi
6767
68-
echo "result=$RESULT" >> $GITHUB_OUTPUT
68+
echo "result=$RESULT" >>$GITHUB_OUTPUT
6969
7070
check:
7171
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-prettier-formatting-task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ jobs:
227227
RESULT="false"
228228
fi
229229
230-
echo "result=$RESULT" >> $GITHUB_OUTPUT
230+
echo "result=$RESULT" >>$GITHUB_OUTPUT
231231
232232
check:
233233
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)