Skip to content

Commit d96fcc4

Browse files
committed
Reduce excessive line lengths in YAML files
The yamllint configuration advocates for keeping line lengths within 120 characters. While exceeding this length only results in a warning, I think it is beneficial to stay within that limit when it is possible and doesn't have a harmful effect. In that spirit, I have reduced the long lines where this was easily done. There remain a few that are either not possible or else not reasonable to reduce, and that's OK.
1 parent f17835d commit d96fcc4

File tree

4 files changed

+44
-14
lines changed

4 files changed

+44
-14
lines changed

.github/workflows/check-license.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99
push:
1010
paths:
1111
- ".github/workflows/check-license.yml"
12-
# Recognized license files. See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file
12+
# Recognized license files.
13+
# See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file
1314
- "[cC][oO][pP][yY][iI][nN][gG]*"
1415
- "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*"
1516
- "[lL][iI][cC][eE][nN][cCsS][eE]*"

.github/workflows/check-toc.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ jobs:
3939
run: sudo npm install --global markdown-toc
4040

4141
- name: Rebuild ToC
42-
run: markdown-toc --bullets=- --maxdepth=${{ matrix.file.maxdepth }} -i "${{ github.workspace }}/${{ matrix.file.name }}"
42+
run: |
43+
markdown-toc \
44+
--bullets=- \
45+
--maxdepth=${{ matrix.file.maxdepth }} \
46+
-i \
47+
"${{ github.workspace }}/${{ matrix.file.name }}"
4348
4449
- name: Check ToC
4550
run: git diff --color --exit-code

.github/workflows/manage-prs.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ env:
44
SUBMISSION_PARSER_VERSION: 1.0.0-rc2 # See: https://github.com/arduino/library-manager-submission-parser/releases
55

66
on:
7-
# pull_request_target trigger is used instead of pull_request so the token will have the write permissions needed to comment and merge.
8-
# Note that this means the version of the workflow from the PR base ref will be used as opposed to the head ref, as is the case with pull_request triggered workflows.
7+
# pull_request_target trigger is used instead of pull_request so the token will have the write permissions needed to
8+
# comment and merge.
9+
# Note that this means the version of the workflow from the PR base ref will be used as opposed to the head ref, as is
10+
# the case with pull_request triggered workflows.
911
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
1012
pull_request_target:
1113
types:
@@ -53,7 +55,8 @@ jobs:
5355
env:
5456
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5557
run: |
56-
# It's necessary to reference both pull_request.number and issue.number because only one of the two are defined depending on whether the workflow is triggered by PR or comment event.
58+
# It's necessary to reference both pull_request.number and issue.number because only one of the two are
59+
# defined depending on whether the workflow is triggered by PR or comment event.
5760
curl \
5861
--fail \
5962
--output "${{ steps.configuration.outputs.path }}/${{ steps.configuration.outputs.filename }}" \
@@ -99,8 +102,14 @@ jobs:
99102
id: parse-request
100103
run: |
101104
chmod u+x "${{ steps.download-parser.outputs.file-path }}"
102-
REQUEST="$("${{ steps.download-parser.outputs.file-path }}" --diffpath="${{ needs.diff.outputs.path }}/${{ needs.diff.outputs.filename }}" --repopath="${{ github.workspace }}" --listname="repositories.txt")"
103-
# Due to limitations of the GitHub Actions workflow system, dedicated outputs must be created for use in certain workflow fields.
105+
REQUEST="$( \
106+
"${{ steps.download-parser.outputs.file-path }}" \
107+
--diffpath="${{ needs.diff.outputs.path }}/${{ needs.diff.outputs.filename }}" \
108+
--repopath="${{ github.workspace }}" \
109+
--listname="repositories.txt" \
110+
)"
111+
# Due to limitations of the GitHub Actions workflow system, dedicated outputs must be created for use in
112+
# certain workflow fields.
104113
echo "::set-output name=type::$(echo "$REQUEST" | jq -r -c '.type')"
105114
echo "::set-output name=submissions::$(echo "$REQUEST" | jq -c '.submissions')"
106115
echo "::set-output name=index-entry::$(echo "$REQUEST" | jq -r -c '.indexEntry')"
@@ -149,7 +158,8 @@ jobs:
149158
env:
150159
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
151160
with:
152-
# NOTE: "Unexpected input(s) ..." warnings for the arbitrary octokit/request-action inputs are normal and expected.
161+
# NOTE: "Unexpected input(s) ..." warnings for the arbitrary octokit/request-action inputs are normal and
162+
# expected.
153163
route: POST /repos/{owner}/{repo}/issues/{issue_number}/comments
154164
owner: ${{ github.repository_owner }}
155165
repo: ${{ github.event.repository.name }}
@@ -167,7 +177,11 @@ jobs:
167177
exit 1
168178
169179
- name: Clone submission
170-
run: git clone --branch ${{ matrix.submission.tag }} --depth 1 ${{ matrix.submission.normalizedURL }} "${{ matrix.submission.name }}"
180+
run: |
181+
git clone \
182+
--branch ${{ matrix.submission.tag }} \
183+
--depth 1 ${{ matrix.submission.normalizedURL }} \
184+
"${{ matrix.submission.name }}"
171185
172186
- name: Lint submission
173187
id: arduino-lint
@@ -187,7 +201,9 @@ jobs:
187201
echo "::set-output name=report::$(jq -c . "${{ env.REPORT_PATH }}")"
188202
189203
- name: Comment on Arduino Lint warning
190-
if: fromJson(steps.read-lint-report.outputs.report).summary.warningCount > 0 && fromJson(steps.read-lint-report.outputs.report).summary.errorCount == 0
204+
if: >
205+
fromJson(steps.read-lint-report.outputs.report).summary.warningCount > 0
206+
&& fromJson(steps.read-lint-report.outputs.report).summary.errorCount == 0
191207
uses: octokit/[email protected]
192208
env:
193209
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -255,7 +271,8 @@ jobs:
255271
- Commit the required change to the branch you submitted this pull request from.
256272
- Comment here, mentioning @ArduinoBot in the comment
257273
258-
More information: https://github.com/${{ github.repository }}/blob/main/README.md#if-the-problem-is-with-the-pull-request"
274+
More information:
275+
https://github.com/${{ github.repository }}/blob/main/README.md#if-the-problem-is-with-the-pull-request
259276
260277
merge:
261278
needs:
@@ -288,7 +305,12 @@ jobs:
288305
git config --global user.name "ArduinoBot"
289306
echo "${{ needs.parse.outputs.index-entry }}" >> "$INDEX_SOURCE_FILE_PATH"
290307
git add --update "$INDEX_SOURCE_FILE_PATH"
291-
echo -e "Add submission # ${{ github.event.pull_request.number }}${{ github.event.issue.number }}\n\n${{ github.event.repository.html_url }}/pull/${{ github.event.pull_request.number }}${{ github.event.issue.number }}" | git commit --file -
308+
echo \
309+
-e \
310+
"Add submission # ${{ github.event.pull_request.number }}${{ github.event.issue.number }}\n\n${{ github.event.repository.html_url }}/pull/${{ github.event.pull_request.number }}${{ github.event.issue.number }}" \
311+
| \
312+
git commit \
313+
--file -
292314
git push
293315
294316
request-review:
@@ -322,7 +344,9 @@ jobs:
322344
issue_number: ${{ github.event.pull_request.number }}${{ github.event.issue.number }}
323345
body: |
324346
|
325-
Hi @${{ github.actor }}. Your pull request has been detected as something other than a Library Manager submission. A maintainer will need to review it before it can be merged.
347+
Hi @${{ github.actor }}.
348+
Your pull request has been detected as something other than a Library Manager submission.
349+
A maintainer will need to review it before it can be merged.
326350
327351
If you intended to submit a library, please check the instructions and update your pull request if necessary:
328352
https://github.com/${{ github.repository }}/blob/main/README.md#instructions

.github/workflows/spell-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Spell check
2525
uses: codespell-project/actions-codespell@master
2626
with:
27-
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
27+
# In the event of false positive, add the problematic word, in all lowercase, to a comma-separated list here:
2828
ignore_words_list: ""
2929
builtin: clear,informal,en-GB_to_en-US
3030
check_filenames: true

0 commit comments

Comments
 (0)