From 09c9094a6b0197fb1f90fe16b356a10ce171b841 Mon Sep 17 00:00:00 2001 From: Pete Davison Date: Fri, 31 Mar 2023 19:13:29 +0000 Subject: [PATCH] feat: enforce gofumpt linter --- .golangci.yml | 1 + CHANGELOG.md | 11 ++++++++++- Taskfile.yml | 8 ++++++++ args/args.go | 4 ++-- args/args_test.go | 1 - cmd/release/main.go | 6 +++--- cmd/sleepit/sleepit.go | 6 ++---- cmd/task/task.go | 2 +- docs/docs/contributing.md | 29 +++++++++++++++++------------ errors.go | 6 ++---- internal/execext/exec.go | 6 ++---- internal/logger/logger.go | 13 ++++++++++--- internal/output/output_test.go | 15 ++++++++------- internal/summary/summary_test.go | 2 -- internal/templater/funcs.go | 4 +--- precondition.go | 7 ++----- task.go | 1 - task_test.go | 13 +++++++------ taskfile/included_taskfile.go | 1 - taskfile/precondition.go | 6 ++---- taskfile/precondition_test.go | 6 ++++-- taskfile/read/taskfile.go | 4 ++-- taskfile/taskfile.go | 1 - taskfile/var.go | 1 - 24 files changed, 84 insertions(+), 70 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index fe8c4d96..c23b1bef 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,6 +7,7 @@ linters: enable: - goimports - gofmt + - gofumpt linters-settings: goimports: diff --git a/CHANGELOG.md b/CHANGELOG.md index d38f066b..66432fd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,19 @@ - Add `.hg` (Mercurial) to the list of ignored directories when using `--watch` (#1098 from @misery). - More improvements to the release tool (#1096 by @pd93) +- Enforce [gofumpt](https://github.com/mvdan/gofumpt) linter (#1099 by @pd93) ## v3.23.0 - 2023-03-26 -Task now has an [official extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=task.vscode-task) contributed by @pd93! :tada: The extension is maintained in a [new repository](https://github.com/go-task/vscode-task) under the `go-task` organization. We're looking to gather feedback from the community so please give it a go and let us know what you think via a [discussion](https://github.com/go-task/vscode-task/discussions), [issue](https://github.com/go-task/vscode-task/issues) or on our [Discord](https://discord.gg/6TY36E39UK)! +Task now has an [official extension for Visual Studio +Code](https://marketplace.visualstudio.com/items?itemName=task.vscode-task) +contributed by @pd93! :tada: The extension is maintained in a [new +repository](https://github.com/go-task/vscode-task) under the `go-task` +organization. We're looking to gather feedback from the community so please give +it a go and let us know what you think via a +[discussion](https://github.com/go-task/vscode-task/discussions), +[issue](https://github.com/go-task/vscode-task/issues) or on our +[Discord](https://discord.gg/6TY36E39UK)! > **NOTE:** > The extension _requires_ v3.23.0 to be installed in order to work. diff --git a/Taskfile.yml b/Taskfile.yml index 14bef3c5..eada85f6 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -62,6 +62,14 @@ tasks: cmds: - golangci-lint run + lint:fix: + desc: Runs golangci-lint and fixes any issues + sources: + - './**/*.go' + - .golangci.yml + cmds: + - golangci-lint run --fix + sleepit:build: desc: Builds the sleepit test helper sources: diff --git a/args/args.go b/args/args.go index 3562ee94..e93e1ade 100644 --- a/args/args.go +++ b/args/args.go @@ -9,7 +9,7 @@ import ( // ParseV3 parses command line argument: tasks and global variables func ParseV3(args ...string) ([]taskfile.Call, *taskfile.Vars) { var calls []taskfile.Call - var globals = &taskfile.Vars{} + globals := &taskfile.Vars{} for _, arg := range args { if !strings.Contains(arg, "=") { @@ -31,7 +31,7 @@ func ParseV3(args ...string) ([]taskfile.Call, *taskfile.Vars) { // ParseV2 parses command line argument: tasks and vars of each task func ParseV2(args ...string) ([]taskfile.Call, *taskfile.Vars) { var calls []taskfile.Call - var globals = &taskfile.Vars{} + globals := &taskfile.Vars{} for _, arg := range args { if !strings.Contains(arg, "=") { diff --git a/args/args_test.go b/args/args_test.go index cb007b02..22768704 100644 --- a/args/args_test.go +++ b/args/args_test.go @@ -203,7 +203,6 @@ func TestArgsV2(t *testing.T) { if test.ExpectedGlobals.Len() > 0 || globals.Len() > 0 { assert.Equal(t, test.ExpectedGlobals, globals) } - }) } } diff --git a/cmd/release/main.go b/cmd/release/main.go index 4b2a0a03..c798c887 100644 --- a/cmd/release/main.go +++ b/cmd/release/main.go @@ -104,7 +104,7 @@ func changelog(version *semver.Version) error { changelog = changelogReleaseRegex.ReplaceAllString(changelog, fmt.Sprintf("## v%s - %s", version, date)) // Write the changelog to the source file - if err := os.WriteFile(changelogSource, []byte(changelog), 0644); err != nil { + if err := os.WriteFile(changelogSource, []byte(changelog), 0o644); err != nil { return err } @@ -116,7 +116,7 @@ func changelog(version *semver.Version) error { changelog = changelogIssueRegex.ReplaceAllString(changelog, "[#$1](https://github.com/go-task/task/issues/$1)") // Write the changelog to the target file - return os.WriteFile(changelogTarget, []byte(changelog), 0644) + return os.WriteFile(changelogTarget, []byte(changelog), 0o644) } func setJSONVersion(fileName string, version *semver.Version) error { @@ -130,5 +130,5 @@ func setJSONVersion(fileName string, version *semver.Version) error { new := versionRegex.ReplaceAllString(string(b), fmt.Sprintf(` "version": "%s",`, version.String())) // Write the JSON file - return os.WriteFile(fileName, []byte(new), 0644) + return os.WriteFile(fileName, []byte(new), 0o644) } diff --git a/cmd/sleepit/sleepit.go b/cmd/sleepit/sleepit.go index 940d362a..f9644053 100644 --- a/cmd/sleepit/sleepit.go +++ b/cmd/sleepit/sleepit.go @@ -19,10 +19,8 @@ Commands handle Handle signals: on reception of SIGINT perform cleanup before exiting version Show the sleepit version` -var ( - // Filled by the linker. - fullVersion = "unknown" // example: v0.0.9-8-g941583d027-dirty -) +// Filled by the linker. +var fullVersion = "unknown" // example: v0.0.9-8-g941583d027-dirty func main() { os.Exit(run(os.Args[1:])) diff --git a/cmd/task/task.go b/cmd/task/task.go index 769fb700..25abeaa8 100644 --- a/cmd/task/task.go +++ b/cmd/task/task.go @@ -181,7 +181,7 @@ func main() { OutputStyle: output, } - var listOptions = task.NewListOptions(list, listAll, listJson) + listOptions := task.NewListOptions(list, listAll, listJson) if err := listOptions.Validate(); err != nil { log.Fatal(err) } diff --git a/docs/docs/contributing.md b/docs/docs/contributing.md index e4a4fca1..c11006fd 100644 --- a/docs/docs/contributing.md +++ b/docs/docs/contributing.md @@ -30,9 +30,12 @@ invest your time into a PR. ## 2. Making changes - **Code style** - Try to maintain the existing code style where possible and - ensure that code is formatted by `gofmt`. We use `golangci-lint` in our CI to - enforce a consistent style and best-practice. There's a `lint` command in - the Taskfile to run this locally. + ensure that code is formatted by + [`gofumpt`](https://github.com/mvdan/gofumpt). We use + [`golangci-lint`](https://golangci-lint.run/) in our CI to enforce a + consistent style and best-practice. You can use the `task lint` command to run + this locally and the `task lint:fix` command to automatically fix any issues + that are found. - **Documentation** - Ensure that you add/update any relevant documentation. See the [updating documentation](#updating-documentation) section below. - **Tests** - Ensure that you add/update any relevant tests and that all tests @@ -60,9 +63,9 @@ documentation and any examples are up-to-date. Ensure that any examples follow the [Taskfile Styleguide](./styleguide.md). If you added a new field, command or flag, ensure that you add it to the [API -Reference](./api_reference.md). New fields also need to be added to the -[JSON Schema]. The descriptions for fields in the API -reference and the schema should match. +Reference](./api_reference.md). New fields also need to be added to the [JSON +Schema]. The descriptions for fields in the API reference and the schema should +match. ### Writing tests @@ -74,13 +77,13 @@ required to run the tests are stored. When making a changes, consider whether new tests are required. These tests should ensure that the functionality you are adding will continue to work in the future. Existing tests may also need updating if you have changed Task's -behaviour. +behavior. ## 3. Committing your code -Try to write meaningful commit messages and avoid having too many commits on -the PR. Most PRs should likely have a single commit (although for bigger PRs it -may be reasonable to split it in a few). Git squash and rebase is your friend! +Try to write meaningful commit messages and avoid having too many commits on the +PR. Most PRs should likely have a single commit (although for bigger PRs it may +be reasonable to split it in a few). Git squash and rebase is your friend! ## 4. Submitting a PR @@ -117,8 +120,10 @@ If you have questions, feel free to ask them in the `#help` forum channel on our [Node.js]: https://nodejs.org/en/ [Yarn]: https://yarnpkg.com/ [Docusaurus]: https://docusaurus.io -[JSON Schema]: https://github.com/go-task/task/blob/master/docs/static/schema.json +[JSON Schema]: + https://github.com/go-task/task/blob/master/docs/static/schema.json [open issues]: https://github.com/go-task/task/issues -[good first issue]: https://github.com/go-task/task/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22 +[good first issue]: + https://github.com/go-task/task/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22 [Discord server]: https://discord.gg/6TY36E39UK [Discussion]: https://github.com/go-task/task/discussions diff --git a/errors.go b/errors.go index e34d02cd..610b3e85 100644 --- a/errors.go +++ b/errors.go @@ -8,10 +8,8 @@ import ( "mvdan.cc/sh/v3/interp" ) -var ( - // ErrTaskfileAlreadyExists is returned on creating a Taskfile if one already exists - ErrTaskfileAlreadyExists = errors.New("task: A Taskfile already exists") -) +// ErrTaskfileAlreadyExists is returned on creating a Taskfile if one already exists +var ErrTaskfileAlreadyExists = errors.New("task: A Taskfile already exists") type taskNotFoundError struct { taskName string diff --git a/internal/execext/exec.go b/internal/execext/exec.go index a560ef01..61c26231 100644 --- a/internal/execext/exec.go +++ b/internal/execext/exec.go @@ -28,10 +28,8 @@ type RunCommandOptions struct { Stderr io.Writer } -var ( - // ErrNilOptions is returned when a nil options is given - ErrNilOptions = errors.New("execext: nil options given") -) +// ErrNilOptions is returned when a nil options is given +var ErrNilOptions = errors.New("execext: nil options given") // RunCommand runs a shell command func RunCommand(ctx context.Context, opts *RunCommandOptions) error { diff --git a/internal/logger/logger.go b/internal/logger/logger.go index b695325f..064a5a1d 100644 --- a/internal/logger/logger.go +++ b/internal/logger/logger.go @@ -8,27 +8,35 @@ import ( "github.com/fatih/color" ) -type Color func() PrintFunc -type PrintFunc func(io.Writer, string, ...any) +type ( + Color func() PrintFunc + PrintFunc func(io.Writer, string, ...any) +) func Default() PrintFunc { return color.New(envColor("TASK_COLOR_RESET", color.Reset)).FprintfFunc() } + func Blue() PrintFunc { return color.New(envColor("TASK_COLOR_BLUE", color.FgBlue)).FprintfFunc() } + func Green() PrintFunc { return color.New(envColor("TASK_COLOR_GREEN", color.FgGreen)).FprintfFunc() } + func Cyan() PrintFunc { return color.New(envColor("TASK_COLOR_CYAN", color.FgCyan)).FprintfFunc() } + func Yellow() PrintFunc { return color.New(envColor("TASK_COLOR_YELLOW", color.FgYellow)).FprintfFunc() } + func Magenta() PrintFunc { return color.New(envColor("TASK_COLOR_MAGENTA", color.FgMagenta)).FprintfFunc() } + func Red() PrintFunc { return color.New(envColor("TASK_COLOR_RED", color.FgRed)).FprintfFunc() } @@ -41,7 +49,6 @@ func envColor(env string, defaultColor color.Attribute) color.Attribute { override, err := strconv.Atoi(os.Getenv(env)) if err == nil { return color.Attribute(override) - } return defaultColor } diff --git a/internal/output/output_test.go b/internal/output/output_test.go index e3a32ef7..c48af87e 100644 --- a/internal/output/output_test.go +++ b/internal/output/output_test.go @@ -17,7 +17,7 @@ import ( func TestInterleaved(t *testing.T) { var b bytes.Buffer var o output.Output = output.Interleaved{} - var w, _, _ = o.WrapWriter(&b, io.Discard, "", nil) + w, _, _ := o.WrapWriter(&b, io.Discard, "", nil) fmt.Fprintln(w, "foo\nbar") assert.Equal(t, "foo\nbar\n", b.String()) @@ -28,7 +28,7 @@ func TestInterleaved(t *testing.T) { func TestGroup(t *testing.T) { var b bytes.Buffer var o output.Output = output.Group{} - var stdOut, stdErr, cleanup = o.WrapWriter(&b, io.Discard, "", nil) + stdOut, stdErr, cleanup := o.WrapWriter(&b, io.Discard, "", nil) fmt.Fprintln(stdOut, "out\nout") assert.Equal(t, "", b.String()) @@ -59,7 +59,7 @@ func TestGroupWithBeginEnd(t *testing.T) { } t.Run("simple", func(t *testing.T) { var b bytes.Buffer - var w, _, cleanup = o.WrapWriter(&b, io.Discard, "", &tmpl) + w, _, cleanup := o.WrapWriter(&b, io.Discard, "", &tmpl) fmt.Fprintln(w, "foo\nbar") assert.Equal(t, "", b.String()) @@ -70,7 +70,7 @@ func TestGroupWithBeginEnd(t *testing.T) { }) t.Run("no output", func(t *testing.T) { var b bytes.Buffer - var _, _, cleanup = o.WrapWriter(&b, io.Discard, "", &tmpl) + _, _, cleanup := o.WrapWriter(&b, io.Discard, "", &tmpl) assert.NoError(t, cleanup(nil)) assert.Equal(t, "", b.String()) }) @@ -81,7 +81,7 @@ func TestGroupErrorOnlySwallowsOutputOnNoError(t *testing.T) { var o output.Output = output.Group{ ErrorOnly: true, } - var stdOut, stdErr, cleanup = o.WrapWriter(&b, io.Discard, "", nil) + stdOut, stdErr, cleanup := o.WrapWriter(&b, io.Discard, "", nil) _, _ = fmt.Fprintln(stdOut, "std-out") _, _ = fmt.Fprintln(stdErr, "std-err") @@ -89,12 +89,13 @@ func TestGroupErrorOnlySwallowsOutputOnNoError(t *testing.T) { assert.NoError(t, cleanup(nil)) assert.Empty(t, b.String()) } + func TestGroupErrorOnlyShowsOutputOnError(t *testing.T) { var b bytes.Buffer var o output.Output = output.Group{ ErrorOnly: true, } - var stdOut, stdErr, cleanup = o.WrapWriter(&b, io.Discard, "", nil) + stdOut, stdErr, cleanup := o.WrapWriter(&b, io.Discard, "", nil) _, _ = fmt.Fprintln(stdOut, "std-out") _, _ = fmt.Fprintln(stdErr, "std-err") @@ -106,7 +107,7 @@ func TestGroupErrorOnlyShowsOutputOnError(t *testing.T) { func TestPrefixed(t *testing.T) { var b bytes.Buffer var o output.Output = output.Prefixed{} - var w, _, cleanup = o.WrapWriter(&b, io.Discard, "prefix", nil) + w, _, cleanup := o.WrapWriter(&b, io.Discard, "prefix", nil) t.Run("simple use cases", func(t *testing.T) { b.Reset() diff --git a/internal/summary/summary_test.go b/internal/summary/summary_test.go index 336fc991..cb142cf4 100644 --- a/internal/summary/summary_test.go +++ b/internal/summary/summary_test.go @@ -147,7 +147,6 @@ func TestPrintDescriptionAsFallback(t *testing.T) { summary.PrintTask(&l, taskWithoutSummaryOrDescription) assert.Contains(t, buffer.String(), "\n(task does not have description or summary)\n") - } func TestPrintAllWithSpaces(t *testing.T) { @@ -169,5 +168,4 @@ func TestPrintAllWithSpaces(t *testing.T) { assert.True(t, strings.HasPrefix(buffer.String(), "task: t1")) assert.Contains(t, buffer.String(), "\n(task does not have description or summary)\n\n\ntask: t2") assert.Contains(t, buffer.String(), "\n(task does not have description or summary)\n\n\ntask: t3") - } diff --git a/internal/templater/funcs.go b/internal/templater/funcs.go index 82f7badc..21eaf8fc 100644 --- a/internal/templater/funcs.go +++ b/internal/templater/funcs.go @@ -11,9 +11,7 @@ import ( "mvdan.cc/sh/v3/syntax" ) -var ( - templateFuncs template.FuncMap -) +var templateFuncs template.FuncMap func init() { taskFuncs := template.FuncMap{ diff --git a/precondition.go b/precondition.go index 3c9b6038..b79f7961 100644 --- a/precondition.go +++ b/precondition.go @@ -10,10 +10,8 @@ import ( "github.com/go-task/task/v3/taskfile" ) -var ( - // ErrPreconditionFailed is returned when a precondition fails - ErrPreconditionFailed = errors.New("task: precondition not met") -) +// ErrPreconditionFailed is returned when a precondition fails +var ErrPreconditionFailed = errors.New("task: precondition not met") func (e *Executor) areTaskPreconditionsMet(ctx context.Context, t *taskfile.Task) (bool, error) { for _, p := range t.Preconditions { @@ -22,7 +20,6 @@ func (e *Executor) areTaskPreconditionsMet(ctx context.Context, t *taskfile.Task Dir: t.Dir, Env: env.Get(t), }) - if err != nil { e.Logger.Errf(logger.Magenta, "task: %s", p.Msg) return false, ErrPreconditionFailed diff --git a/task.go b/task.go index 1244f8c3..e85441f5 100644 --- a/task.go +++ b/task.go @@ -404,7 +404,6 @@ func (e *Executor) GetTaskList(filters ...FilterFunc) ([]*taskfile.Task, error) for key := range e.Taskfile.Tasks { task := e.Taskfile.Tasks[key] g.Go(func() error { - // Check if we should filter the task for _, filter := range filters { if filter(task) { diff --git a/task_test.go b/task_test.go index 7aafa6cc..b98cc526 100644 --- a/task_test.go +++ b/task_test.go @@ -397,7 +397,7 @@ func TestGenerates(t *testing.T) { fileWithSpaces = "my text file.txt" ) - var srcFile = filepathext.SmartJoin(dir, srcTask) + srcFile := filepathext.SmartJoin(dir, srcTask) for _, task := range []string{srcTask, relTask, absTask, fileWithSpaces} { path := filepathext.SmartJoin(dir, task) @@ -416,8 +416,8 @@ func TestGenerates(t *testing.T) { assert.NoError(t, e.Setup()) for _, theTask := range []string{relTask, absTask, fileWithSpaces} { - var destFile = filepathext.SmartJoin(dir, theTask) - var upToDate = fmt.Sprintf("task: Task \"%s\" is up to date\n", srcTask) + + destFile := filepathext.SmartJoin(dir, theTask) + upToDate := fmt.Sprintf("task: Task \"%s\" is up to date\n", srcTask) + fmt.Sprintf("task: Task \"%s\" is up to date\n", theTask) // Run task for the first time. @@ -704,7 +704,7 @@ func TestStatusVariables(t *testing.T) { func TestInit(t *testing.T) { const dir = "testdata/init" - var file = filepathext.SmartJoin(dir, "Taskfile.yml") + file := filepathext.SmartJoin(dir, "Taskfile.yml") _ = os.Remove(file) if _, err := os.Stat(file); err == nil { @@ -964,7 +964,8 @@ func TestIncludesOptional(t *testing.T) { TrimSpace: true, Files: map[string]string{ "called_dep.txt": "called_dep", - }} + }, + } tt.Run(t) } @@ -1327,7 +1328,6 @@ func TestDisplaysErrorOnUnsupportedVersion(t *testing.T) { err := e.Setup() assert.Error(t, err) assert.Equal(t, "task: Taskfile versions prior to v2 are not supported anymore", err.Error()) - } func TestShortTaskNotation(t *testing.T) { @@ -1576,6 +1576,7 @@ Bye! t.Log(buff.String()) assert.Equal(t, strings.TrimSpace(buff.String()), expectedOutputOrder) } + func TestOutputGroupErrorOnlySwallowsOutputOnSuccess(t *testing.T) { const dir = "testdata/output_group_error_only" var buff bytes.Buffer diff --git a/taskfile/included_taskfile.go b/taskfile/included_taskfile.go index 15653a3b..6137344f 100644 --- a/taskfile/included_taskfile.go +++ b/taskfile/included_taskfile.go @@ -32,7 +32,6 @@ type IncludedTaskfiles struct { // UnmarshalYAML implements the yaml.Unmarshaler interface. func (tfs *IncludedTaskfiles) UnmarshalYAML(node *yaml.Node) error { switch node.Kind { - case yaml.MappingNode: // NOTE(@andreynering): on this style of custom unmarshalling, // even number contains the keys, while odd numbers contains diff --git a/taskfile/precondition.go b/taskfile/precondition.go index e558d921..bb19dcbf 100644 --- a/taskfile/precondition.go +++ b/taskfile/precondition.go @@ -7,10 +7,8 @@ import ( "gopkg.in/yaml.v3" ) -var ( - // ErrCantUnmarshalPrecondition is returned for invalid precond YAML. - ErrCantUnmarshalPrecondition = errors.New("task: Can't unmarshal precondition value") -) +// ErrCantUnmarshalPrecondition is returned for invalid precond YAML. +var ErrCantUnmarshalPrecondition = errors.New("task: Can't unmarshal precondition value") // Precondition represents a precondition necessary for a task to run type Precondition struct { diff --git a/taskfile/precondition_test.go b/taskfile/precondition_test.go index 25c19867..95b307f6 100644 --- a/taskfile/precondition_test.go +++ b/taskfile/precondition_test.go @@ -25,14 +25,16 @@ func TestPreconditionParse(t *testing.T) { &taskfile.Precondition{}, &taskfile.Precondition{Sh: "[ 1 = 0 ]", Msg: "[ 1 = 0 ] failed"}, }, - {` + { + ` sh: "[ 1 = 2 ]" msg: "1 is not 2" `, &taskfile.Precondition{}, &taskfile.Precondition{Sh: "[ 1 = 2 ]", Msg: "1 is not 2"}, }, - {` + { + ` sh: "[ 1 = 2 ]" msg: "1 is not 2" `, diff --git a/taskfile/read/taskfile.go b/taskfile/read/taskfile.go index 58197b1c..ecf00e3b 100644 --- a/taskfile/read/taskfile.go +++ b/taskfile/read/taskfile.go @@ -263,8 +263,8 @@ func checkCircularIncludes(node *ReaderNode) error { if node.Parent == nil { return errors.New("task: failed to check for include cycle: node.Parent was nil") } - var curNode = node - var basePath = filepathext.SmartJoin(node.Dir, node.Entrypoint) + curNode := node + basePath := filepathext.SmartJoin(node.Dir, node.Entrypoint) for curNode.Parent != nil { curNode = curNode.Parent curPath := filepathext.SmartJoin(curNode.Dir, curNode.Entrypoint) diff --git a/taskfile/taskfile.go b/taskfile/taskfile.go index babe1c3e..8fe6931d 100644 --- a/taskfile/taskfile.go +++ b/taskfile/taskfile.go @@ -34,7 +34,6 @@ type Taskfile struct { func (tf *Taskfile) UnmarshalYAML(node *yaml.Node) error { switch node.Kind { - case yaml.MappingNode: var taskfile struct { Version *semver.Version diff --git a/taskfile/var.go b/taskfile/var.go index e84ce8e8..aa446441 100644 --- a/taskfile/var.go +++ b/taskfile/var.go @@ -15,7 +15,6 @@ type Vars struct { func (vs *Vars) UnmarshalYAML(node *yaml.Node) error { switch node.Kind { - case yaml.MappingNode: // NOTE(@andreynering): on this style of custom unmarshalling, // even number contains the keys, while odd numbers contains