-
Notifications
You must be signed in to change notification settings - Fork 9
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
Change criteria bracketing behaviour #181
Conversation
Signed-off-by: Andrew Twydell <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #181 +/- ##
==========================================
- Coverage 93.81% 93.76% -0.05%
==========================================
Files 75 75
Lines 776 770 -6
Branches 44 42 -2
==========================================
- Hits 728 722 -6
Misses 48 48 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I've tested this by pulling the head commit from main, running I then pull the bracketing branch, I've tried (successfully)...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good !
Release succeeded for the The following packages have been published:
Powered by Octorelease 🚀 |
@@ -398,12 +398,12 @@ describe('Utils - enforceParentheses', () => { | |||
|
|||
it("should add first bracket when end exists", () => { | |||
const output = Utils.enforceParentheses("input with spaces)"); | |||
expect(output).toEqual("(input with spaces)"); | |||
expect(output).toEqual("(input with spaces))"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested this yet, but it doesn't seem like having an extra closing )
will work in some scenarios 🤔
What It Does
Resolves #180
Adds vagueness to the bracketing behaviour to allow a string that ends in brackets but not starts with to be handled correctly. This does add some responsibility to the caller creating the criteria string, but prevents unwanted behaviour like the below example.
Currently, if you pass a string like
NOT (PROGRAM=ABC* OR PROGRAM=BCD*)
, it will send back(NOT (PROGRAM=ABC* OR PROGRAM=BCD*)
, whereas we would want a bracket at the end too.Review Checklist
I certify that I have: