Skip to content

Commit dee5390

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 9269175 commit dee5390

File tree

4 files changed

+32
-8
lines changed

4 files changed

+32
-8
lines changed

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ jobs:
3636
id: determination
3737
run: |
3838
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
39-
if [[ "${{ github.event_name }}" == "push" || ( "${{ github.event_name }}" == "create" && "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX ) ]]; then
39+
if [[
40+
"${{ github.event_name }}" == "push" ||
41+
(
42+
"${{ github.event_name }}" == "create" &&
43+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
44+
)
45+
]]; then
4046
RESULT="true"
4147
else
4248
RESULT="false"
@@ -85,7 +91,12 @@ jobs:
8591
# Publishing implies creating a git commit on the gh-pages branch, we let @ArduinoBot own these commits.
8692
git config --global user.email "[email protected]"
8793
git config --global user.name "ArduinoBot"
88-
git fetch --no-tags --prune --depth=1 origin +refs/heads/gh-pages:refs/remotes/origin/gh-pages
94+
git fetch \
95+
--no-tags \
96+
--prune \
97+
--depth=1 \
98+
origin \
99+
+refs/heads/gh-pages:refs/remotes/origin/gh-pages
89100
poetry run mike deploy \
90101
--update-aliases \
91102
--push \

.github/workflows/generate-index.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ jobs:
7070
# disable gpg pass prompt
7171
# https://stackoverflow.com/questions/49072403/suppress-the-passphrase-prompt-in-gpg-command
7272
- name: sign the json
73-
run: gpg --pinentry-mode=loopback --passphrase "${{ secrets.PASSPHRASE }}" --output boards/module_firmware_index.json.sig --detach-sign boards/module_firmware_index.json
73+
run: |
74+
gpg \
75+
--pinentry-mode=loopback \
76+
--passphrase "${{ secrets.PASSPHRASE }}" \
77+
--output boards/module_firmware_index.json.sig \
78+
--detach-sign boards/module_firmware_index.json
7479
7580
- name: create the gzip
7681
run: gzip --keep boards/module_firmware_index.json

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ jobs:
8989
env:
9090
KEYCHAIN: "sign.keychain"
9191
INSTALLER_CERT_MAC_PATH: "/tmp/ArduinoCerts2020.p12"
92-
KEYCHAIN_PASSWORD: keychainpassword # Arbitrary password for a keychain that exists only for the duration of the job, so not secret
92+
# Arbitrary password for a keychain that exists only for the duration of the job, so not secret
93+
KEYCHAIN_PASSWORD: keychainpassword
9394
run: |
9495
echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode > "${{ env.INSTALLER_CERT_MAC_PATH }}"
9596
security create-keychain -p "${{ env.KEYCHAIN_PASSWORD }}" "${{ env.KEYCHAIN }}"

Taskfile.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ tasks:
2929
echo "Licensed does not have Windows support."
3030
echo "Please use Linux/macOS or download the dependencies cache from the GitHub Actions workflow artifact."
3131
else
32-
echo "licensed not found or not in PATH. Please install: https://github.com/github/licensed#as-an-executable"
32+
echo "licensed not found or not in PATH."
33+
echo "Please install: https://github.com/github/licensed#as-an-executable"
3334
fi
3435
exit 1
3536
fi
@@ -85,7 +86,8 @@ tasks:
8586
# npx --call uses the native shell, which makes it too difficult to use npx for this application on Windows,
8687
# so the Windows user is required to have markdown-link-check installed and in PATH.
8788
if ! which markdown-link-check &>/dev/null; then
88-
echo "markdown-link-check not found or not in PATH. Please install: https://github.com/tcort/markdown-link-check#readme"
89+
echo "markdown-link-check not found or not in PATH."
90+
echo "Please install: https://github.com/tcort/markdown-link-check#readme"
8991
exit 1
9092
fi
9193
# Default behavior of the task on Windows is to exit the task when the first broken link causes a non-zero
@@ -190,7 +192,8 @@ tasks:
190192
cmds:
191193
- |
192194
if ! which ec &>/dev/null; then
193-
echo "ec not found or not in PATH. Please install: https://github.com/editorconfig-checker/editorconfig-checker#installation"
195+
echo "ec not found or not in PATH."
196+
echo "Please install: https://github.com/editorconfig-checker/editorconfig-checker#installation"
194197
exit 1
195198
fi
196199
- ec
@@ -240,7 +243,11 @@ vars:
240243
DEFAULT_GO_MODULE_PATH: ./
241244
DEFAULT_GO_PACKAGES:
242245
sh: |
243-
echo $(cd {{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}} && go list ./... | tr '\n' ' ' || echo '"ERROR: Unable to discover Go packages"')
246+
echo $(
247+
cd {{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}} &&
248+
go list ./... | tr '\n' ' ' ||
249+
echo '"ERROR: Unable to discover Go packages"'
250+
)
244251
# build vars
245252
COMMIT:
246253
sh: echo "$(git log --no-show-signature -n 1 --format=%h)"

0 commit comments

Comments
 (0)