Skip to content

Commit bf25b5b

Browse files
authored
Merge pull request #188 from per1234/expand-ignores
Expand ignored path configurations
2 parents 0c7669d + 7938366 commit bf25b5b

File tree

14 files changed

+89
-15
lines changed

14 files changed

+89
-15
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[codespell]
44
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
55
ignore-words-list = licence,ot
6-
skip = ./.git,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock
6+
skip = ./.git,./.licenses,__pycache__,node_modules,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock
77
builtin = clear,informal,en-GB_to_en-US
88
check-filenames =
99
check-hidden =

.ecrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"Exclude": [
3-
"^\\.licenses/",
3+
"^\\.git[/\\\\]",
4+
"^\\.licenses[/\\\\]",
5+
"__pycache__[/\\\\]",
6+
"node_modules[/\\\\]",
47
"^LICENSE\\.txt$",
58
"^poetry\\.lock$"
69
]

.markdownlintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown/.markdownlintignore
2+
.licenses/
3+
__pycache__/
4+
node_modules/

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.licenses/
2+
__pycache__/
3+
node_modules/

.yamllint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,5 @@ yaml-files:
7272

7373
ignore: |
7474
/.git/
75+
__pycache__/
76+
node_modules/

Taskfile.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ tasks:
166166
-regex '.*\.ya?ml' \
167167
-exec cp '{}' "{{.WORKFLOW_TEMPLATE_COPIES_PATH}}" \;
168168
169+
docs:generate:
170+
desc: Create all generated documentation content
171+
# This is an "umbrella" task used to call any documentation generation processes the project has.
172+
# It can be left empty if there are none.
173+
169174
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-general-formatting-task/Taskfile.yml
170175
general:check-formatting:
171176
desc: Check basic formatting style of all files
@@ -214,6 +219,8 @@ tasks:
214219
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml
215220
markdown:check-links:
216221
desc: Check for broken links
222+
deps:
223+
- task: docs:generate
217224
cmds:
218225
- |
219226
if [[ "{{.OS}}" == "Windows_NT" ]]; then
@@ -230,7 +237,14 @@ tasks:
230237
# Using -regex instead of -name to avoid Task's behavior of globbing even when quoted on Windows
231238
# The odd method for escaping . in the regex is required for windows compatibility because mvdan.cc/sh gives
232239
# \ characters special treatment on Windows in an attempt to support them as path separators.
233-
for file in $(find . -regex ".*[.]md"); do
240+
for file in $(
241+
find . \
242+
-type d -name '.git' -prune -o \
243+
-type d -name '.licenses' -prune -o \
244+
-type d -name '__pycache__' -prune -o \
245+
-type d -name 'node_modules' -prune -o \
246+
-regex ".*[.]md" -print
247+
); do
234248
markdown-link-check \
235249
--quiet \
236250
--config "./.markdown-link-check.json" \
@@ -241,7 +255,14 @@ tasks:
241255
else
242256
npx --package=markdown-link-check --call='
243257
STATUS=0
244-
for file in $(find . -regex ".*[.]md"); do
258+
for file in $(
259+
find . \
260+
-type d -name '.git' -prune -o \
261+
-type d -name '.licenses' -prune -o \
262+
-type d -name '__pycache__' -prune -o \
263+
-type d -name 'node_modules' -prune -o \
264+
-regex ".*[.]md" -print
265+
); do
245266
markdown-link-check \
246267
--quiet \
247268
--config "./.markdown-link-check.json" \
@@ -319,12 +340,16 @@ tasks:
319340
# The odd method for escaping . in the regex is required for windows compatibility because mvdan.cc/sh gives
320341
# \ characters special treatment on Windows in an attempt to support them as path separators.
321342
find . \
322-
-path ".git" -prune -or \
343+
-type d -name '.git' -prune -or \
344+
-type d -name '.licenses' -prune -or \
345+
-type d -name '__pycache__' -prune -or \
346+
-type d -name 'node_modules' -prune -or \
323347
\( \
324348
-regextype posix-extended \
325349
-regex '.*[.](bash|sh)' -and \
326350
-type f \
327-
\)
351+
\) \
352+
-print
328353
)
329354
330355
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-shell-task/Taskfile.yml
@@ -345,7 +370,10 @@ tasks:
345370
# The odd approach to escaping `.` in the regex is required for windows compatibility because mvdan.cc/sh
346371
# gives `\` characters special treatment on Windows in an attempt to support them as path separators.
347372
find . \
348-
-path ".git" -prune -or \
373+
-type d -name '.git' -prune -or \
374+
-type d -name '.licenses' -prune -or \
375+
-type d -name '__pycache__' -prune -or \
376+
-type d -name 'node_modules' -prune -or \
349377
\( \
350378
-regextype posix-extended \
351379
-regex '.*[.](bash|sh)' -and \

workflow-templates/assets/check-general-formatting/.ecrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"Exclude": [
3-
"^\\.licenses/",
3+
"^\\.git[/\\\\]",
4+
"^\\.licenses[/\\\\]",
5+
"__pycache__[/\\\\]",
6+
"node_modules[/\\\\]",
47
"^LICENSE\\.txt$",
58
"^poetry\\.lock$"
69
]

workflow-templates/assets/check-markdown-task/Taskfile.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ tasks:
2828
# Using -regex instead of -name to avoid Task's behavior of globbing even when quoted on Windows
2929
# The odd method for escaping . in the regex is required for windows compatibility because mvdan.cc/sh gives
3030
# \ characters special treatment on Windows in an attempt to support them as path separators.
31-
for file in $(find . -regex ".*[.]md"); do
31+
for file in $(
32+
find . \
33+
-type d -name '.git' -prune -o \
34+
-type d -name '.licenses' -prune -o \
35+
-type d -name '__pycache__' -prune -o \
36+
-type d -name 'node_modules' -prune -o \
37+
-regex ".*[.]md" -print
38+
); do
3239
markdown-link-check \
3340
--quiet \
3441
--config "./.markdown-link-check.json" \
@@ -39,7 +46,14 @@ tasks:
3946
else
4047
npx --package=markdown-link-check --call='
4148
STATUS=0
42-
for file in $(find . -regex ".*[.]md"); do
49+
for file in $(
50+
find . \
51+
-type d -name '.git' -prune -o \
52+
-type d -name '.licenses' -prune -o \
53+
-type d -name '__pycache__' -prune -o \
54+
-type d -name 'node_modules' -prune -o \
55+
-regex ".*[.]md" -print
56+
); do
4357
markdown-link-check \
4458
--quiet \
4559
--config "./.markdown-link-check.json" \
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown/.markdownlintignore
2+
.licenses/
3+
__pycache__/
4+
node_modules/
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
/.licenses/
1+
.licenses/
2+
__pycache__/
3+
node_modules/

workflow-templates/assets/check-shell-task/Taskfile.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ tasks:
2222
# The odd method for escaping . in the regex is required for windows compatibility because mvdan.cc/sh gives
2323
# \ characters special treatment on Windows in an attempt to support them as path separators.
2424
find . \
25-
-path ".git" -prune -or \
25+
-type d -name '.git' -prune -or \
26+
-type d -name '.licenses' -prune -or \
27+
-type d -name '__pycache__' -prune -or \
28+
-type d -name 'node_modules' -prune -or \
2629
\( \
2730
-regextype posix-extended \
2831
-regex '.*[.](bash|sh)' -and \
2932
-type f \
30-
\)
33+
\) \
34+
-print
3135
)
3236
3337
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-shell-task/Taskfile.yml
@@ -48,7 +52,10 @@ tasks:
4852
# The odd approach to escaping `.` in the regex is required for windows compatibility because mvdan.cc/sh
4953
# gives `\` characters special treatment on Windows in an attempt to support them as path separators.
5054
find . \
51-
-path ".git" -prune -or \
55+
-type d -name '.git' -prune -or \
56+
-type d -name '.licenses' -prune -or \
57+
-type d -name '__pycache__' -prune -or \
58+
-type d -name 'node_modules' -prune -or \
5259
\( \
5360
-regextype posix-extended \
5461
-regex '.*[.](bash|sh)' -and \

workflow-templates/assets/check-yaml/.yamllint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,5 @@ yaml-files:
7272

7373
ignore: |
7474
/.git/
75+
__pycache__/
76+
node_modules/

workflow-templates/assets/spell-check/.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[codespell]
44
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
55
ignore-words-list = ,
6-
skip = ./.git,./.licenses,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock
6+
skip = ./.git,./.licenses,__pycache__,node_modules,./go.mod,./go.sum,./package-lock.json,./poetry.lock,./yarn.lock
77
builtin = clear,informal,en-GB_to_en-US
88
check-filenames =
99
check-hidden =

workflow-templates/check-markdown-task.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Install the [`check-markdown-task.yml`](check-markdown-task.yml) GitHub Actions
2121
- Install to: repository root
2222
- [`.markdownlint.yml`](assets/check-markdown/.markdownlint.yml) - markdownlint configuration file.
2323
- Install to: repository root
24+
- [`.markdownlintignore`](assets/check-markdown/.markdownlint.yml) - markdownlint configuration file.
25+
- Install to: repository root
2426
- [`Taskfile.yml`](assets/check-markdown-task/Taskfile.yml) - Markdown tasks.
2527
- Install to: repository root (or merge into the existing `Taskfile.yml`).
2628

0 commit comments

Comments
 (0)