MCPcopy
hub / github.com/go-task/task / shouldTaskUseGitignore

Method shouldTaskUseGitignore

variables.go:25–30  ·  view source on GitHub ↗

shouldTaskUseGitignore resolves whether gitignore filtering applies to a task: the task-level value takes precedence, falling back to the Taskfile's global use_gitignore when the task does not set it.

(t *ast.Task)

Source from the content-addressed store, hash-verified

23// task: the task-level value takes precedence, falling back to the Taskfile's
24// global use_gitignore when the task does not set it.
25func (e *Executor) shouldTaskUseGitignore(t *ast.Task) bool {
26 if t.UseGitignore != nil {
27 return *t.UseGitignore
28 }
29 return e.Taskfile.UseGitignore != nil && *e.Taskfile.UseGitignore
30}
31
32// CompiledTask returns a copy of a task, but replacing variables in almost all
33// properties using the Go template package.

Callers 2

compiledTaskMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected