Skip to content

Commit 2f2cf90

Browse files
authored
Merge pull request #167 from per1234/document-task-parameters
Document task environment variable parameters
2 parents 95cd213 + a2d4d14 commit 2f2cf90

File tree

1 file changed

+31
-9
lines changed

1 file changed

+31
-9
lines changed

Taskfile.yml

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,21 +157,33 @@ tasks:
157157

158158
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
159159
go:fix:
160-
desc: Modernize usages of outdated APIs
160+
desc: |
161+
Modernize usages of outdated APIs.
162+
Environment variable parameters:
163+
- GO_MODULE_PATH: Path of the Go module root (default: {{.DEFAULT_GO_MODULE_PATH}}).
164+
- GO_PACKAGES: List of Go packages to modernize (default: all packages of the module).
161165
dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}"
162166
cmds:
163167
- go fix {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
164168

165169
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
166170
go:format:
167-
desc: Format Go code
171+
desc: |
172+
Format Go code.
173+
Environment variable parameters:
174+
- GO_MODULE_PATH: Path of the Go module root (default: {{.DEFAULT_GO_MODULE_PATH}}).
175+
- GO_PACKAGES: List of Go packages to modernize (default: all packages of the module).
168176
dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}"
169177
cmds:
170178
- go fmt {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
171179

172180
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
173181
go:lint:
174-
desc: Lint Go code
182+
desc: |
183+
Lint Go code.
184+
Environment variable parameters:
185+
- GO_MODULE_PATH: Path of the Go module root (default: {{.DEFAULT_GO_MODULE_PATH}}).
186+
- GO_PACKAGES: List of Go packages to modernize (default: all packages of the module).
175187
dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}"
176188
cmds:
177189
- |
@@ -186,7 +198,11 @@ tasks:
186198
187199
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml
188200
go:vet:
189-
desc: Check for errors in Go code
201+
desc: |
202+
Check for errors in Go code.
203+
Environment variable parameters:
204+
- GO_MODULE_PATH: Path of the Go module root (default: {{.DEFAULT_GO_MODULE_PATH}}).
205+
- GO_PACKAGES: List of Go packages to modernize (default: all packages of the module).
190206
dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}"
191207
cmds:
192208
- go vet {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
@@ -256,7 +272,7 @@ tasks:
256272
desc: |
257273
Install dependencies managed by npm.
258274
Environment variable parameters:
259-
PROJECT_PATH: Path of the npm-managed project (default: {{.DEFAULT_NPM_PROJECT_PATH}}).
275+
- PROJECT_PATH: Path of the npm-managed project (default: {{.DEFAULT_NPM_PROJECT_PATH}}).
260276
dir: |
261277
"{{default .DEFAULT_NPM_PROJECT_PATH .PROJECT_PATH}}"
262278
run: when_changed
@@ -268,7 +284,7 @@ tasks:
268284
desc: |
269285
Validate npm configuration files against their JSON schema.
270286
Environment variable parameters:
271-
PROJECT_PATH: Path of the npm-managed project (default: {{.DEFAULT_NPM_PROJECT_PATH}}).
287+
- PROJECT_PATH: Path of the npm-managed project (default: {{.DEFAULT_NPM_PROJECT_PATH}}).
272288
deps:
273289
- task: npm:install-deps
274290
vars:
@@ -380,7 +396,7 @@ tasks:
380396
desc: |
381397
Install dependencies managed by Poetry.
382398
Environment variable parameters:
383-
POETRY_GROUPS: Poetry dependency groups to install (default: install all dependencies).
399+
- POETRY_GROUPS: Poetry dependency groups to install (default: install all dependencies).
384400
run: when_changed
385401
deps:
386402
- task: poetry:install
@@ -407,7 +423,9 @@ tasks:
407423
poetry check \
408424
--lock
409425
410-
# Make a temporary file named according to the passed TEMPLATE variable and print the path passed to stdout
426+
# Make a temporary file and print the path passed to stdout.
427+
# Environment variable parameters:
428+
# - TEMPLATE: template for the format of the filename.
411429
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/windows-task/Taskfile.yml
412430
utility:mktemp-file:
413431
vars:
@@ -418,7 +436,9 @@ tasks:
418436
vars:
419437
RAW_PATH: "{{.RAW_PATH}}"
420438

421-
# Print a normalized version of the path passed via the RAW_PATH variable to stdout
439+
# Print a normalized version of the path to stdout.
440+
# Environment variable parameters:
441+
# - RAW_PATH: the path to be normalized.
422442
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/windows-task/Taskfile.yml
423443
utility:normalize-path:
424444
cmds:
@@ -431,6 +451,8 @@ tasks:
431451
echo "{{.RAW_PATH}}"
432452
fi
433453
454+
# Environment variable parameters:
455+
# - YAMLLINT_FORMAT: yamllint output format (default: colored).
434456
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-yaml-task/Taskfile.yml
435457
yaml:lint:
436458
desc: Check for problems with YAML files

0 commit comments

Comments
 (0)