Skip to main content

Module references

Module references 

Source
Expand description

References command - Find all references to a symbol

Wires tldr-core::analysis::references to the CLI (Session 7 Phase 12).

§Features

  • Text search with word boundary matching
  • AST-based verification to filter false positives
  • Reference kind classification (call, read, write, import, type)
  • Search scope optimization based on symbol visibility
  • Multiple output formats: JSON, text

§Risk Mitigations

  • S7-R31: Command registered in mod.rs and main.rs
  • S7-R32: format_references_text implemented below
  • S7-R33: find_references exported from tldr_core::analysis::references
  • S7-R46: Tab alignment - expand tabs to spaces in context
  • S7-R50: No suggestions on no match - suggest similar symbols
  • S7-R51: Too many references - respect limit, show count
  • S7-R56: Path not found error - include tried path in message
  • S7-R57: Unsupported language - list supported languages in error

Structs§

ReferencesArgs
Find all references to a symbol