Skip to content

Conversation

@jac18281828
Copy link
Owner

No description provided.

@jac18281828 jac18281828 requested a review from Copilot July 6, 2025 18:37
@jac18281828 jac18281828 self-assigned this Jul 6, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

A major refactoring that centralizes CLI invocation in tests, enhances the DSL parsing capabilities (conditional templates, regex operator, improved truthiness), and restructures core parsing modules.

  • Added a parsm_command() helper across all integration tests and updated test cases to use it.
  • Extended the DSL parser and engine to support the ~= regex operator, conditional templates, and richer truthiness rules.
  • Introduced a parser registry and improved format detection heuristics in parser_registry.rs and format_detector.rs.

Reviewed Changes

Copilot reviewed 30 out of 34 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/* Consolidated command invocation via parsm_command() and revised test inputs/outputs
src/parser_registry.rs Added ParserRegistry for prioritized format parsing and fallback
src/format_detector.rs Improved heuristics for JSON array, YAML, TOML, CSV, and logfmt detection
src/filter.rs Added Regex and Conditional support, enhanced truthiness and comparison logic
src/dsl/template_parser.rs Refactored template parsing to handle braced, bracketed, and numeric variables
src/dsl/operators.rs Replaced ~ with ~= for regex matching, updated operator definitions
Comments suppressed due to low confidence (1)

src/filter.rs:117

  • A new TemplateItem::Conditional variant was introduced but there are no unit tests covering its behavior. Add tests to verify rendering of conditionals for both truthy and falsy branches.
pub enum TemplateItem {

@jac18281828 jac18281828 force-pushed the jac/csv branch 2 times, most recently from 81a2a25 to bde80b2 Compare July 6, 2025 19:17
@jac18281828 jac18281828 merged commit 3e7ce58 into main Jul 6, 2025
5 of 6 checks passed
@jac18281828 jac18281828 deleted the jac/csv branch July 6, 2025 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants