@@ -10,14 +10,42 @@ tasks:
1010 desc : Check for problems with the project
1111 deps :
1212 - task : npm:validate
13+ - task : general:check-spelling
1314
15+ fix :
16+ desc : Make automated corrections to the project's files
17+ deps :
18+ - task : general:correct-spelling
19+
20+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml
21+ general:check-spelling :
22+ desc : Check for commonly misspelled words
23+ deps :
24+ - task : poetry:install-deps
25+ cmds :
26+ - poetry run codespell
27+
28+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml
29+ general:correct-spelling :
30+ desc : Correct commonly misspelled words where possible
31+ deps :
32+ - task : poetry:install-deps
33+ cmds :
34+ - poetry run codespell --write-changes
35+
36+ # Parameter variables:
37+ # - PROJECT_PATH: path of the npm-managed project. Default value: "./"
1438 # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/npm-task/Taskfile.yml
1539 npm:install-deps :
1640 desc : Install dependencies managed by npm
17- run : once
41+ dir : |
42+ "{{default "./" .PROJECT_PATH}}"
1843 cmds :
1944 - npm install
2045
46+
47+ # Parameter variables:
48+ # - PROJECT_PATH: path of the npm-managed project. Default value: "./"
2149 # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-npm-task/Taskfile.yml
2250 npm:validate :
2351 desc : Validate npm configuration files against their JSON schema
5482 STYLELINTRC_SCHEMA_URL : https://json.schemastore.org/stylelintrc.json
5583 STYLELINTRC_SCHEMA_PATH :
5684 sh : task utility:mktemp-file TEMPLATE="stylelintrc-schema-XXXXXXXXXX.json"
57- INSTANCE_PATH : " **/package.json"
85+ INSTANCE_PATH : >-
86+ {{default "." .PROJECT_PATH}}/package.json
5887 PROJECT_FOLDER :
5988 sh : pwd
6089 WORKING_FOLDER :
@@ -82,6 +111,12 @@ tasks:
82111 -r "{{.STYLELINTRC_SCHEMA_PATH}}" \
83112 -d "{{.PROJECT_FOLDER}}/{{.INSTANCE_PATH}}"
84113
114+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
115+ poetry:install-deps :
116+ desc : Install dependencies managed by Poetry
117+ cmds :
118+ - poetry install --no-root
119+
85120 # Make a temporary file named according to the passed TEMPLATE variable and print the path passed to stdout
86121 # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/windows-task/Taskfile.yml
87122 utility:mktemp-file :
0 commit comments