Skip to content

Wave 4c: Result formatting and output #201

Description

@dean0x

Overview

Format compound search results for terminal and JSON output.

Module: crates/rskim-search/src/compound/output.rs (~200 lines)

Terminal format

```
src/auth/handler.rs:42 [0.87] FunctionSignature
pub async fn handle_auth(req: AuthRequest) -> Result { /* ... */ }

src/models/user.rs:15 [0.72] TypeDefinition
pub struct AuthRequest { ... }
```

JSON format

Valid JSON array with all fields: file_path, line, score, field, snippet, layers_matched.

Dependencies

Acceptance Criteria

  • Terminal output readable with metadata
  • JSON output valid and complete
  • Respects --limit flag
  • Follows output patterns from existing rskim output modules

Implementation Guidelines Checklist

  • No file exceeds 400 lines
  • Every public function has /// doc comment
  • Module has #[cfg(test)] mod tests

Wave 3g (#199) follow-up:

#199 ships file-level AST-only output (matched pattern name + description + file path + AST score; no line numbers). Precise line spans require re-parsing each matched file because the AST index is file-level (no stored line offsets). #201 should add the line-span re-parse to produce per-match line numbers/snippets for AST-only results.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    searchCode search featurewave-4Wave 4: Compound queries

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions