Skip to content

Commit b9f5a82

Browse files
committed
Reduce line length to <=120 in YAML files where feasible
120 columns is the recommended line length for YAML code in Arduino tooling projects. The yamllint tool used by the "Check YAML" template produces a warning when a line exceeds this length. This is not a hard limit and in some cases it is either impossible or not beneficial to make lines less than 120 in length so some violations of the guideline are unavoidable. However, a survey of the YAML files in the repository revealed some opportunities for improving the code by reducing the lengths.
1 parent 2a372c5 commit b9f5a82

5 files changed

+37
-9
lines changed

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ jobs:
106106
run: |
107107
cd "${{ env.INSTALL_PATH }}"
108108
tar --extract --file="${{ steps.download.outputs.name }}"
109-
EXTRACTION_FOLDER="$(basename "${{ steps.download.outputs.name }}" "${{ env.SHELLCHECK_RELEASE_ASSET_SUFFIX }}")"
109+
EXTRACTION_FOLDER="$(
110+
basename \
111+
"${{ steps.download.outputs.name }}" \
112+
"${{ env.SHELLCHECK_RELEASE_ASSET_SUFFIX }}"
113+
)"
110114
# Add installation to PATH:
111115
# See: https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-system-path
112116
echo "${{ env.INSTALL_PATH }}/$EXTRACTION_FOLDER" >> "$GITHUB_PATH"

.github/workflows/deploy-cobra-mkdocs-versioned-poetry.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ jobs:
4040
id: determination
4141
run: |
4242
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
43-
if [[ "${{ github.event_name }}" == "push" || ( "${{ github.event_name }}" == "create" && "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX ) ]]; then
43+
if [[
44+
"${{ github.event_name }}" == "push" ||
45+
(
46+
"${{ github.event_name }}" == "create" &&
47+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
48+
)
49+
]]; then
4450
RESULT="true"
4551
else
4652
RESULT="false"
@@ -96,7 +102,12 @@ jobs:
96102
# Publishing implies creating a git commit on the gh-pages branch, we let @ArduinoBot own these commits.
97103
git config --global user.email "[email protected]"
98104
git config --global user.name "ArduinoBot"
99-
git fetch --no-tags --prune --depth=1 origin +refs/heads/gh-pages:refs/remotes/origin/gh-pages
105+
git fetch \
106+
--no-tags \
107+
--prune \
108+
--depth=1 \
109+
origin \
110+
+refs/heads/gh-pages:refs/remotes/origin/gh-pages
100111
poetry run mike deploy \
101112
--update-aliases \
102113
--push \

.github/workflows/publish-go-nightly-task.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ jobs:
106106
env:
107107
KEYCHAIN: "sign.keychain"
108108
INSTALLER_CERT_MAC_PATH: "/tmp/ArduinoCerts2020.p12"
109-
KEYCHAIN_PASSWORD: keychainpassword # Arbitrary password for a keychain that exists only for the duration of the job, so not secret
109+
# Arbitrary password for a keychain that exists only for the duration of the job, so not secret
110+
KEYCHAIN_PASSWORD: keychainpassword
110111
run: |
111112
echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode > "${{ env.INSTALLER_CERT_MAC_PATH }}"
112113
security create-keychain -p "${{ env.KEYCHAIN_PASSWORD }}" "${{ env.KEYCHAIN }}"

.github/workflows/release-go-task.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ jobs:
115115
env:
116116
KEYCHAIN: "sign.keychain"
117117
INSTALLER_CERT_MAC_PATH: "/tmp/ArduinoCerts2020.p12"
118-
KEYCHAIN_PASSWORD: keychainpassword # Arbitrary password for a keychain that exists only for the duration of the job, so not secret
118+
# Arbitrary password for a keychain that exists only for the duration of the job, so not secret
119+
KEYCHAIN_PASSWORD: keychainpassword
119120
run: |
120121
echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode > "${{ env.INSTALLER_CERT_MAC_PATH }}"
121122
security create-keychain -p "${{ env.KEYCHAIN_PASSWORD }}" "${{ env.KEYCHAIN }}"
@@ -211,7 +212,15 @@ jobs:
211212
run: |
212213
wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.2.0.zip
213214
unzip -p /tmp/3.2.0.zip semver-tool-3.2.0/src/semver >/tmp/semver && chmod +x /tmp/semver
214-
if [[ "$(/tmp/semver get prerel "${GITHUB_REF/refs\/tags\//}")" ]]; then echo "::set-output name=IS_PRE::true"; fi
215+
if [[ \
216+
"$(
217+
/tmp/semver get prerel \
218+
"${GITHUB_REF/refs\/tags\//}"
219+
)" != \
220+
"" \
221+
]]; then
222+
echo "IS_PRE=true" >> $GITHUB_OUTPUT
223+
fi
215224
216225
- name: Create Github Release and upload artifacts
217226
uses: ncipollo/release-action@v1

Taskfile.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ tasks:
154154
echo "Licensed does not have Windows support."
155155
echo "Please use Linux/macOS or download the dependencies cache from the GitHub Actions workflow artifact."
156156
else
157-
echo "licensed not found or not in PATH. Please install: https://github.com/github/licensed#as-an-executable"
157+
echo "licensed not found or not in PATH."
158+
echo "Please install: https://github.com/github/licensed#as-an-executable"
158159
fi
159160
exit 1
160161
fi
@@ -174,7 +175,8 @@ tasks:
174175
cmds:
175176
- |
176177
if ! which ec &>/dev/null; then
177-
echo "ec not found or not in PATH. Please install: https://github.com/editorconfig-checker/editorconfig-checker#installation"
178+
echo "ec not found or not in PATH."
179+
echo "Please install: https://github.com/editorconfig-checker/editorconfig-checker#installation"
178180
exit 1
179181
fi
180182
- ec
@@ -410,7 +412,8 @@ tasks:
410412
fi
411413
- |
412414
if ! which shellcheck &>/dev/null; then
413-
echo "shellcheck not installed or not in PATH. Please install: https://github.com/koalaman/shellcheck#installing"
415+
echo "shellcheck not installed or not in PATH."
416+
echo "Please install: https://github.com/koalaman/shellcheck#installing"
414417
exit 1
415418
fi
416419
- |

0 commit comments

Comments
 (0)