feat: named filter parameters and enhanced truncate#2
Merged
Conversation
- Add ArgumentNullException.ThrowIfNull(name) to GetNamed() and HasFlag() - Replace mutable Dictionary in FilterArguments.Empty with ReadOnlyDictionary - Reuse shared EmptyNamedDictionary in EvaluateFilter for positional-only case - Remove unrelated context7.json from feature branch
RoboNET
added a commit
that referenced
this pull request
Mar 11, 2026
* feat(filters): add FilterArguments class and update ITemplateFilter signature * refactor(filters): migrate all filters to FilterArguments signature * feat(filters): add named parameter and flag parsing to filter syntax * feat(filters): wire named parameters through evaluator to FilterArguments * feat(filters): enhance truncate with suffix, fromEnd, and type conversion * test: add end-to-end integration tests for named filter parameters * docs: update wiki with named filter parameters and enhanced truncate * fix(filters): add null guards, immutable empty dict, reduce allocations - Add ArgumentNullException.ThrowIfNull(name) to GetNamed() and HasFlag() - Replace mutable Dictionary in FilterArguments.Empty with ReadOnlyDictionary - Reuse shared EmptyNamedDictionary in EvaluateFilter for positional-only case - Remove unrelated context7.json from feature branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
key:valuenamed params and boolean flags ({{value | truncate:30 suffix:'…' fromEnd}})FilterArgumentsabstraction replacing singleTemplateValue?argument — providesPositional,GetNamed(),HasFlag()suffix(default"..."),fromEndflag for reverse truncation, non-string input conversion (Number/Bool → string, Null → empty)ITemplateFilter.Applysignature updated, all 8 built-in filters migratedTest Plan