diff --git a/internal/core/adt/context.go b/internal/core/adt/context.go index 4a4ec0fb2..174eb9161 100644 --- a/internal/core/adt/context.go +++ b/internal/core/adt/context.go @@ -1245,10 +1245,6 @@ var regexpCache = newMemoizer(func(pattern string) (*regexp.Regexp, error) { return regexp.Compile(pattern) }) -// cachedRegexp returns a compiled regexp for the given pattern, using a shared -// cache to avoid recompilation and enable thread-safe access. -// - func (c *OpContext) regexp(v Value) *regexp.Regexp { v = Unwrap(v) if isError(v) { diff --git a/internal/cuetxtar/inline_attr.go b/internal/cuetxtar/inline_attr.go index 821d6a14d..9bd5213a2 100644 --- a/internal/cuetxtar/inline_attr.go +++ b/internal/cuetxtar/inline_attr.go @@ -487,14 +487,6 @@ func appendPath(base cue.Path, label ast.Label, hidPkg string) cue.Path { return cue.MakePath(fresh...) } -// parseAtPath parses an at= selector string into a cue.Path. -// Unlike cue.ParsePath, it handles: -// - Hidden field names with a $pkg qualifier, e.g. "_foo$pkg" → -// cue.Hid("_foo", ":pkg"), matching the syntax used inside @test(eq, ...) -// bodies. -// - Integer segments as list-index selectors, e.g. "items.0" → -// [items, Index(0)]. -// // directiveKey returns the deduplication key for a directive. Two directives // with the same name but different at= values are independent assertions and // must both survive deduplication in selectActiveDirectives. @@ -507,6 +499,14 @@ func directiveKey(pa parsedTestAttr) string { return pa.directive } +// parseAtPath parses an at= selector string into a cue.Path. +// Unlike cue.ParsePath, it handles: +// - Hidden field names with a $pkg qualifier, e.g. "_foo$pkg" → +// cue.Hid("_foo", ":pkg"), matching the syntax used inside @test(eq, ...) +// bodies. +// - Integer segments as list-index selectors, e.g. "items.0" → +// [items, Index(0)]. +// // Dotted paths are split on "." and each segment is processed independently, // so "a._foo$pkg.0" works correctly. func parseAtPath(at string) (cue.Path, error) { diff --git a/internal/cuetxtar/inline_err.go b/internal/cuetxtar/inline_err.go index 1aedbb0ce..5d6597d75 100644 --- a/internal/cuetxtar/inline_err.go +++ b/internal/cuetxtar/inline_err.go @@ -945,7 +945,6 @@ func (r *inlineRunner) reportPosMismatch(t testing.TB, path cue.Path, directive } // checkErrPositions verifies that the error positions on val match the pos= - // spec in pa. When positions don't match: // - pos=[] (placeholder): update on CUE_UPDATE=1. // - pos=[non-empty]: update on CUE_UPDATE=force only. diff --git a/pkg/encoding/openapi/openapi.go b/pkg/encoding/openapi/openapi.go index 692ad9e7b..56f865680 100644 --- a/pkg/encoding/openapi/openapi.go +++ b/pkg/encoding/openapi/openapi.go @@ -42,7 +42,7 @@ var ( // // version holds the OpenAPI version to use when marshaling. // // Currently only "3.0.0" is supported. // version!: "3.0.0" // currently "3.0.0" only - +// // // selfContained causes all non-expanded external references // // to be included// // selfContained?: bool