Skip to content

Commit 588aa3c

Browse files
committed
Better naming
1 parent 8babf43 commit 588aa3c

26 files changed

Lines changed: 168 additions & 168 deletions

File tree

AGENTS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The Go toolchain version comes from `go.mod` (`go 1.26.2`). Tests run with
8686
(mirrors how `/bin/sh` resolves duplicates).
8787
- `app_test.go::newTestApp(t, dir, args...)` — builds an `App` wired to
8888
byte buffers; pass `dir = ""` to use the real `os.Getwd`.
89-
- Tests construct `Taskfile` literals directly when a YAML round-trip
89+
- Tests construct `taskfile.Config` literals directly when a YAML round-trip
9090
isn't part of the contract under test — this is the preferred style
9191
for runner-level tests. Use `Parse` / `LoadWithIncludes` only when the
9292
YAML/AST behavior matters.
@@ -96,7 +96,7 @@ The Go toolchain version comes from `go.mod` (`go 1.26.2`). Tests run with
9696

9797
## Configuration
9898

99-
- **`gogo.yaml`** — repo's own taskfile (the project eats its own dog food).
99+
- **`gogo.yaml`** — repo's own task file (the project eats its own dog food).
100100
Edit when changing dev workflows.
101101
- **`.golangci.yml`** — single source of truth for lint config; keep
102102
`gci.sections` in sync if the module path ever changes.
@@ -120,7 +120,7 @@ The Go toolchain version comes from `go.mod` (`go 1.26.2`). Tests run with
120120
decide whether `UnmarshalYAML` needs string-shorthand support, thread
121121
it through `Runner.run` in the right phase (deps → vars → requires →
122122
env → preconditions → up-to-date → cmds), and cover it with a literal
123-
`Taskfile` test in `run_test.go` plus a `Parse`-based test in
123+
`taskfile.Config` test in `run_test.go` plus a `Parse`-based test in
124124
`parse_test.go` if YAML shape matters.
125125
- **Touching env/var resolution**: respect the existing precedence
126126
(`BaseEnv` < task dotenv < task vars < task env) and the rule that

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ gogo -n build
6363
- **Concurrent dependencies** with automatic deduplication
6464
- **Variables** with template expansion and shell commands
6565
- **Dotenv** support (global and per-task)
66-
- **Includes** for splitting taskfiles across subdirectories
66+
- **Includes** for splitting task files across subdirectories
6767
- **Platform filtering** to restrict tasks to specific OS/arch
6868
- **Required variables** validation before execution
6969
- **1Password secrets** integration via `op://` references

app_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func writeFile(t *testing.T, path, content string) {
2020
}
2121

2222
// newTestApp builds an App wired to byte buffers, with Getwd pinned to dir.
23-
// Pass an empty dir to fall back to os.Getwd (useful for tests that don't need a taskfile).
23+
// Pass an empty dir to fall back to os.Getwd (useful for tests that don't need a task file).
2424
func newTestApp(t *testing.T, dir string, cliArgs ...string) (*App, *bytes.Buffer, *bytes.Buffer) {
2525
t.Helper()
2626
var stdout, stderr bytes.Buffer
@@ -45,7 +45,7 @@ func TestIsInternalTask(t *testing.T) {
4545
}
4646

4747
func TestVisibleTaskNames(t *testing.T) {
48-
tf := &taskfile.Taskfile{
48+
tf := &taskfile.Config{
4949
Tasks: map[string]taskfile.Task{
5050
"build": {},
5151
"_internal": {},
@@ -168,15 +168,15 @@ tasks:
168168
assert.Equal(t, "build\ntest\n", stdout.String())
169169
}
170170

171-
func TestAppCompleteSilentOnMissingTaskfile(t *testing.T) {
171+
func TestAppCompleteSilentOnMissingFile(t *testing.T) {
172172
app, stdout, stderr := newTestApp(t, t.TempDir(), "--complete")
173173

174174
require.NoError(t, app.Run(t.Context()))
175175
assert.Empty(t, stdout.String())
176176
assert.Empty(t, stderr.String())
177177
}
178178

179-
func TestAppListFailsWhenNoTaskfileFound(t *testing.T) {
179+
func TestAppListFailsWhenNoFileFound(t *testing.T) {
180180
app, _, _ := newTestApp(t, t.TempDir(), "--list")
181181

182182
err := app.Run(t.Context())

docs/_data/nav.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
- section: Features
99
items:
10-
- title: Taskfile Syntax
11-
url: /features/taskfile-syntax/
10+
- title: Task File Syntax
11+
url: /features/task-file-syntax/
1212
- title: Variables
1313
url: /features/variables/
1414
- title: Dependencies

docs/features/cli/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ gogo -w test
5151
gogo test -- -v -run TestFoo
5252
```
5353

54-
## Taskfile Discovery
54+
## Task File Discovery
5555

56-
gogo walks up the directory tree to find the topmost directory containing a `gogo.yaml` file. This means you can run gogo from any subdirectory and it will find the root taskfile.
56+
gogo walks up the directory tree to find the topmost directory containing a `gogo.yaml` file. This means you can run gogo from any subdirectory and it will find the root task file.

docs/features/dotenv/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ DB_PASSWORD='s3cret'
5555
- Per-task dotenv values override global dotenv values
5656
- Existing environment variables are never overridden
5757
- Missing files are silently skipped
58-
- Global dotenv paths are relative to the taskfile directory
58+
- Global dotenv paths are relative to the task file directory
5959
- Per-task dotenv paths are relative to the task's working directory
6060
- `~/` is expanded to the home directory
6161

6262
## With Includes
6363

64-
When using [includes](../includes/), each included taskfile can define its own `dotenv` files. Files are deduplicated by absolute path — the same `.env` file is never loaded twice.
64+
When using [includes](../includes/), each included task file can define its own `dotenv` files. Files are deduplicated by absolute path — the same `.env` file is never loaded twice.

docs/features/includes/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Includes
44

55
# Includes
66

7-
Split your taskfile into multiple files across subdirectories. Each included directory must contain its own `gogo.yaml`.
7+
Split your task file into multiple files across subdirectories. Each included directory must contain its own `gogo.yaml`.
88

99
## Basic Setup
1010

@@ -54,4 +54,4 @@ gogo build # resolves to backend:build
5454

5555
## Dotenv Deduplication
5656

57-
Each included taskfile can define its own `dotenv` files. If multiple includes reference the same `.env` file (by absolute path), it's loaded only once.
57+
Each included task file can define its own `dotenv` files. If multiple includes reference the same `.env` file (by absolute path), it's loaded only once.

docs/features/sources-checksums/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Patterns containing `**` are matched recursively across all subdirectories (hidd
6060

6161
## Checksum Storage
6262

63-
Checksums are stored in `.gogo/checksum/` relative to the taskfile directory. You should add `.gogo/` to your `.gitignore`:
63+
Checksums are stored in `.gogo/checksum/` relative to the task file directory. You should add `.gogo/` to your `.gitignore`:
6464

6565
```
6666
# .gitignore
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Taskfile Syntax
2+
title: Task File Syntax
33
---
44

5-
# Taskfile Syntax
5+
# Task File Syntax
66

77
gogo reads task definitions from a `gogo.yaml` file in the current directory.
88

@@ -11,7 +11,7 @@ gogo reads task definitions from a `gogo.yaml` file in the current directory.
1111
| Field | Type | Description |
1212
|-------|------|-------------|
1313
| `version` | string | Optional version identifier |
14-
| `includes` | list of strings | Subdirectories containing other taskfiles |
14+
| `includes` | list of strings | Subdirectories containing other task files |
1515
| `dotenv` | list of strings | Paths to `.env` files to load |
1616
| `vars` | map | Global variables |
1717
| `interval` | string | Default polling interval for watch mode (e.g. `500ms`) |

docs/features/variables/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gogo supports variables that can be used in commands via `{{ "{{" }}.VAR}}` temp
88

99
## Global Variables
1010

11-
Define variables at the top level of your taskfile:
11+
Define variables at the top level of your task file:
1212

1313
```yaml
1414
vars:
@@ -55,7 +55,7 @@ tasks:
5555
5656
| Variable | Description |
5757
|----------|-------------|
58-
| `TASKFILE_DIR` | The working directory for the task (defaults to the taskfile directory) |
58+
| `TASK_FILE_DIR` | The working directory for the task (defaults to the task file directory) |
5959
| `CLI_ARGS` | Extra arguments passed after `--` |
6060

6161
## CLI Arguments
@@ -74,15 +74,15 @@ gogo test -- -v -run TestFoo
7474

7575
## Environment Variable Expansion
7676

77-
Variables in the taskfile are expanded from environment variables using `{{ "{{" }}.VAR}}` syntax at parse time:
77+
Variables in the task file are expanded from environment variables using `{{ "{{" }}.VAR}}` syntax at parse time:
7878

7979
```yaml
8080
tasks:
8181
deploy:
8282
cmd: deploy --region {{ "{{" }}.AWS_REGION}}
8383
```
8484

85-
If `AWS_REGION` is set in the environment, it will be substituted before the taskfile is processed.
85+
If `AWS_REGION` is set in the environment, it will be substituted before the task file is processed.
8686

8787
## Task Environment
8888

0 commit comments

Comments
 (0)