diff --git a/internal/core/compile/builtin.go b/internal/core/compile/builtin.go index 4178b57a71a..62c6acc04a2 100644 --- a/internal/core/compile/builtin.go +++ b/internal/core/compile/builtin.go @@ -24,7 +24,6 @@ import ( const supportedByLen = adt.StructKind | adt.BytesKind | adt.StringKind | adt.ListKind var ( - stringParam = adt.Param{Value: &adt.BasicType{K: adt.StringKind}} structParam = adt.Param{Value: &adt.BasicType{K: adt.StructKind}} listParam = adt.Param{Value: &adt.BasicType{K: adt.ListKind}} intParam = adt.Param{Value: &adt.BasicType{K: adt.IntKind}} diff --git a/internal/vcs/vcs_test.go b/internal/vcs/vcs_test.go index 459366be708..947e9a111e6 100644 --- a/internal/vcs/vcs_test.go +++ b/internal/vcs/vcs_test.go @@ -138,6 +138,7 @@ func TestGit(t *testing.T) { err = os.WriteFile(filepath.Join(dir, "bar.txt"), []byte("something else"), 0o666) qt.Assert(t, qt.IsNil(err)) statuschanged, err := v.Status(ctx) + qt.Assert(t, qt.IsNil(err)) qt.Assert(t, qt.IsTrue(statuschanged.Uncommitted)) status1, err := v.Status(ctx, subdir) qt.Assert(t, qt.IsNil(err)) diff --git a/pkg/path/match.go b/pkg/path/match.go index 4e191cb7266..fe1a5d0a658 100644 --- a/pkg/path/match.go +++ b/pkg/path/match.go @@ -103,7 +103,7 @@ Pattern: // Before returning false with no error, // check that the remainder of the pattern is syntactically valid. for len(pattern) > 0 { - _, chunk, pattern, err = scanChunk(pattern, os) + _, _, pattern, err = scanChunk(pattern, os) if err != nil { return false, err } diff --git a/pkg/tool/cli/cli.go b/pkg/tool/cli/cli.go index 3efd7ab172f..32f80bc9624 100644 --- a/pkg/tool/cli/cli.go +++ b/pkg/tool/cli/cli.go @@ -94,12 +94,7 @@ func (c *askCmd) Run(ctx *task.Context) (res interface{}, err error) { switch v := ctx.Lookup("response"); v.IncompleteKind() { case cue.BoolKind: - switch strings.ToLower(response) { - case "yes": - update["response"] = true - default: - update["response"] = false - } + update["response"] = strings.ToLower(response) == "yes" case cue.StringKind: // already set above }