Skip to content

Reject or honor graph snippet-lines without body #4882

Description

@Widthdom

Summary

References/callers/callees accept --snippet-lines without --body but return ordinary one-line context with no warning, making the option a silent no-op.

Audit IDs: Q-25. Reproduced with locally built cdidx v1.40.3 at 404db09489c305f17d94f37026e00564d3ac527a.

Existing issue relationship

No exact existing issue was found.

Expected behavior and PR scope

Either apply snippet width independently or reject the combination with a stable usage error requiring --body. Keep this to shared graph-option validation/rendering.

Implementation guide for Codex 5.6 sol xhigh

  • Choose and document one consistent semantic across references/callers/callees and formats.
  • Normalize shared flags before command dispatch so all graph commands agree.
  • Cover zero/positive/large values, body present/absent, JSON/human/quickfix/LSP, and replay/query context.
  • Do not report the option as applied if it was ignored.
  • Add focused regression/contract tests, run the full net8.0 and net9.0 suite, and add the required bilingual changelog.d/unreleased/ fragment.

Acceptance criteria

  • The flag visibly changes output or is explicitly rejected.
  • All graph commands share the same behavior.
  • Query context never hides a no-op.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .NET codebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions