style: fix formatting

This commit is contained in:
Valentin Maerten
2026-04-04 13:14:43 +02:00
parent 7705f922c1
commit de99487b65
3 changed files with 32 additions and 32 deletions

View File

@@ -38,7 +38,7 @@ type Task struct {
Method string
Prefix string `hash:"ignore"`
IgnoreError bool
UseGitignore *bool
UseGitignore *bool
Run string
Platforms []*Platform
If string
@@ -157,7 +157,7 @@ func (t *Task) UnmarshalYAML(node *yaml.Node) error {
Method string
Prefix string
IgnoreError bool `yaml:"ignore_error"`
UseGitignore *bool `yaml:"use_gitignore,omitempty"`
UseGitignore *bool `yaml:"use_gitignore,omitempty"`
Run string
Platforms []*Platform
If string
@@ -242,7 +242,7 @@ func (t *Task) DeepCopy() *Task {
Method: t.Method,
Prefix: t.Prefix,
IgnoreError: t.IgnoreError,
UseGitignore: deepcopy.Scalar(t.UseGitignore),
UseGitignore: deepcopy.Scalar(t.UseGitignore),
Run: t.Run,
IncludeVars: t.IncludeVars.DeepCopy(),
IncludedTaskfileVars: t.IncludedTaskfileVars.DeepCopy(),

View File

@@ -20,20 +20,20 @@ var ErrIncludedTaskfilesCantHaveDotenvs = errors.New("task: Included Taskfiles c
// Taskfile is the abstract syntax tree for a Taskfile
type Taskfile struct {
Location string
Version *semver.Version
Output Output
Method string
Includes *Includes
Set []string
Shopt []string
Vars *Vars
Env *Vars
Tasks *Tasks
Silent bool
Dotenv []string
Run string
Interval time.Duration
Location string
Version *semver.Version
Output Output
Method string
Includes *Includes
Set []string
Shopt []string
Vars *Vars
Env *Vars
Tasks *Tasks
Silent bool
Dotenv []string
Run string
Interval time.Duration
UseGitignore bool `yaml:"use_gitignore"`
}
@@ -77,19 +77,19 @@ func (tf *Taskfile) UnmarshalYAML(node *yaml.Node) error {
switch node.Kind {
case yaml.MappingNode:
var taskfile struct {
Version *semver.Version
Output Output
Method string
Includes *Includes
Set []string
Shopt []string
Vars *Vars
Env *Vars
Tasks *Tasks
Silent bool
Dotenv []string
Run string
Interval time.Duration
Version *semver.Version
Output Output
Method string
Includes *Includes
Set []string
Shopt []string
Vars *Vars
Env *Vars
Tasks *Tasks
Silent bool
Dotenv []string
Run string
Interval time.Duration
UseGitignore bool `yaml:"use_gitignore"`
}
if err := node.Decode(&taskfile); err != nil {

View File

@@ -59,7 +59,7 @@ func (e *Executor) CompiledTaskForTaskList(call *Call) (*ast.Task, error) {
Env: nil,
Dotenv: origTask.Dotenv,
Silent: deepcopy.Scalar(origTask.Silent),
UseGitignore: deepcopy.Scalar(origTask.UseGitignore),
UseGitignore: deepcopy.Scalar(origTask.UseGitignore),
Interactive: origTask.Interactive,
Internal: origTask.Internal,
Method: origTask.Method,
@@ -132,7 +132,7 @@ func (e *Executor) compiledTask(call *Call, evaluateShVars bool) (*ast.Task, err
Env: nil,
Dotenv: templater.Replace(origTask.Dotenv, cache),
Silent: deepcopy.Scalar(origTask.Silent),
UseGitignore: &gitignore,
UseGitignore: &gitignore,
Interactive: origTask.Interactive,
Internal: origTask.Internal,
Method: templater.Replace(origTask.Method, cache),