diff --git a/cue/load/tags.go b/cue/load/tags.go index 397249d2ce6..32e64f15a68 100644 --- a/cue/load/tags.go +++ b/cue/load/tags.go @@ -241,7 +241,7 @@ func findTags(b *build.Instance) (tags []*tag, errs errors.Error) { if f, ok := n.(*ast.Field); ok { for _, a := range f.Attrs { if key, _ := a.Split(); key == "tag" { - errs = errors.Append(errs, errors.Newf(a.Pos(), msg)) + errs = errors.Append(errs, errors.Newf(a.Pos(), "%s", msg)) // TODO: add position of x. } } diff --git a/internal/core/compile/compile.go b/internal/core/compile/compile.go index f870b3ec05b..a812b6803d1 100644 --- a/internal/core/compile/compile.go +++ b/internal/core/compile/compile.go @@ -1066,7 +1066,7 @@ func (c *compiler) parse(l *ast.BasicLit) (n adt.Expr) { case token.STRING: info, nStart, _, err := literal.ParseQuotes(s, s) if err != nil { - return c.errf(l, err.Error()) + return c.errf(l, "%s", err.Error()) } s := s[nStart:] return parseString(c, l, info, s) diff --git a/internal/golangorgx/gopls/cache/view.go b/internal/golangorgx/gopls/cache/view.go index 843e7ea3228..90eaa681df6 100644 --- a/internal/golangorgx/gopls/cache/view.go +++ b/internal/golangorgx/gopls/cache/view.go @@ -747,7 +747,7 @@ func (s *Snapshot) initialize(ctx context.Context, firstAttempt bool) { } case len(modDiagnostics) > 0: initialErr = &InitializationError{ - MainError: fmt.Errorf(modDiagnostics[0].Message), + MainError: fmt.Errorf("%s", modDiagnostics[0].Message), } } diff --git a/internal/golangorgx/gopls/test/integration/fake/editor.go b/internal/golangorgx/gopls/test/integration/fake/editor.go index 5d6dcfcb849..93999bb7dd7 100644 --- a/internal/golangorgx/gopls/test/integration/fake/editor.go +++ b/internal/golangorgx/gopls/test/integration/fake/editor.go @@ -637,7 +637,7 @@ func (e *Editor) SaveBufferWithoutActions(ctx context.Context, path string) erro defer e.mu.Unlock() buf, ok := e.buffers[path] if !ok { - return fmt.Errorf(fmt.Sprintf("unknown buffer: %q", path)) + return fmt.Errorf("unknown buffer: %q", path) } content := buf.text() includeText := false