Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pat: add prefix pattern #190

Merged
merged 3 commits into from
Feb 22, 2023
Merged

pat: add prefix pattern #190

merged 3 commits into from
Feb 22, 2023

Conversation

timbray
Copy link
Owner

@timbray timbray commented Jan 28, 2023

fixes: #62
Signed-off-by: Tim Bray tbray@textuality.com

@codecov-commenter
Copy link

codecov-commenter commented Jan 28, 2023

Codecov Report

Base: 95.93% // Head: 95.83% // Decreases project coverage by -0.10% ⚠️

Coverage data is based on head (efa114a) compared to base (a40e66c).
Patch coverage: 91.48% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #190      +/-   ##
==========================================
- Coverage   95.93%   95.83%   -0.10%     
==========================================
  Files          17       17              
  Lines        2067     2114      +47     
==========================================
+ Hits         1983     2026      +43     
- Misses         60       62       +2     
- Partials       24       26       +2     
Impacted Files Coverage Δ
value_matcher.go 91.77% <85.71%> (-1.31%) ⬇️
pattern.go 96.59% <100.00%> (+0.41%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

fixes: #62
Signed-off-by: Tim Bray <tbray@textuality.com>
@timbray
Copy link
Owner Author

timbray commented Jan 29, 2023

Hmm, I guess I should bump version to 1.1.0, this is a new feature.

@embano1
Copy link
Collaborator

embano1 commented Jan 30, 2023

Hmm, I guess I should bump version to 1.1.0, this is a new feature.

You mean after merge, right? Agree, this is not just a patch release.

@timbray
Copy link
Owner Author

timbray commented Jan 31, 2023

OK, I just realized this PR is stupid because

{"a": [ {"prefix": "foo"}]}

is identical to

{"a": [ { "shellstyle": "foo*"} ] } 

which is already implemented. So I will rewrite and with much less code.

@timbray timbray marked this pull request as draft January 31, 2023 17:44
fixes: #62
Signed-off-by: Tim Bray <tbray@textuality.com>
@timbray
Copy link
Owner Author

timbray commented Jan 31, 2023

is identical to

{"a": [ { "shellstyle": "foo*"} ] } 

Actually, I'm an idiot squared. That breaks if there's a * in the prefix. OK, am happy with this now, un-draft-i-fying it, would appreciate a review

@timbray timbray marked this pull request as ready for review January 31, 2023 23:22
README.md Show resolved Hide resolved
pattern.go Show resolved Hide resolved
pattern.go Outdated Show resolved Hide resolved
pattern.go Show resolved Hide resolved
value_matcher.go Outdated Show resolved Hide resolved
value_matcher.go Outdated Show resolved Hide resolved
@embano1
Copy link
Collaborator

embano1 commented Feb 9, 2023

Just nits left, I'll approve and let you decide whether you want to make small adjustments based on the review. At least reverting the default scenario seems like a zero-waste but good engineering practice.

embano1
embano1 previously approved these changes Feb 9, 2023
fixes: #62

Signed-off-by: Tim Bray <tbray@textuality.com>
Copy link
Collaborator

@embano1 embano1 left a comment

Choose a reason for hiding this comment

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

LGTM

@timbray timbray merged commit 643a245 into main Feb 22, 2023
@timbray timbray deleted the add-prefix branch February 22, 2023 00:11
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.

pat: Implement prefix pattern
3 participants