Skip to content

Commit e4b9373

Browse files
committed
Document task environment variable parameters
Some tasks accept input via environment variables. It is important to document these parameter variables. Previously, the parameter environment variables of these tasks were undocumented. Typically, the documentation is done in the task description, to make the information easily accessible to contributors via the `task list` output. However, this approach was intentionally eschewed in the case of the `yaml:lint` task, where the documentation was instead placed in a comment. The reason is that this task's parameter variable is only useful when the task is executed by a GitHub Actions workflow, as is done already in the "Check YAML" workflow. So the contributor running the task from the command line has no need for this information and thus including it in the description would only clutter up the `task list` output with content useless to the reader of that output.
1 parent 2affc92 commit e4b9373

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Taskfile.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,11 @@ tasks:
342342

343343
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-go-task/Taskfile.yml
344344
go:test:
345-
desc: Run unit tests
345+
desc: |
346+
Run unit tests.
347+
Environment variable parameters:
348+
- GO_MODULE_PATH: Path of the Go module root (default: {{.DEFAULT_GO_MODULE_PATH}}).
349+
- GO_PACKAGES: List of Go packages to test (default: all packages of the module).
346350
dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}"
347351
cmds:
348352
- |

0 commit comments

Comments
 (0)