diff --git a/review/persona.go b/review/persona.go index c9c71cb..9a42884 100644 --- a/review/persona.go +++ b/review/persona.go @@ -152,7 +152,7 @@ func parsePersona(data []byte, source string) (*Persona, error) { // Without this check, input like `{"name":"x"}garbage` would // silently succeed because Decoder stops after one object. var dummy json.RawMessage - if dec.More() || dec.Decode(&dummy) != io.EOF { + if err2 := dec.Decode(&dummy); err2 != io.EOF { err = fmt.Errorf("unexpected trailing content after JSON object") } } @@ -205,7 +205,7 @@ func unmarshalYAMLWithDepthLimit(data []byte, out any, maxDepth int) error { // checkYAMLDepth recursively checks that YAML AST nodes don't exceed the depth // limit or the total node count limit. It uses two tracking maps: -// - validated: maps each node to the minimum depth at which it was previously +// - validated: maps each node to the maximum depth at which it was previously // checked. If a node is revisited at a deeper depth (e.g., via an alias), // we re-check it to ensure the combined effective depth doesn't exceed limits. // - visiting: per-path recursion stack for true cycle detection. A node on the