-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
detect/integers: add support for negated strings when enum is used - v2 #12453
detect/integers: add support for negated strings when enum is used - v2 #12453
Conversation
function detect_parse_uint_enum can parse strings like !bind_request Ticket: OISF#7513
I edited my comment to add SV_BRANCH, so I think we have to rerun the checks to use the right sv branch |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12453 +/- ##
=======================================
Coverage 80.63% 80.63%
=======================================
Files 920 920
Lines 258704 258710 +6
=======================================
+ Hits 208595 208620 +25
+ Misses 50109 50090 -19
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Thanks for the work :-)
All good, except we want some doc addition :-)
CI : 🟢
Code : good
Commits segmentation : ok thanks
Commit messages : good
Git ID set : looks fine for me
CLA : you already contributed
Doc update : enumerations
section
Redmine ticket : ok
Rustfmt : good :-)
Tests : nice, thanks
Dependencies added: none
if let Ok((_, ctx)) = detect_parse_uint::<T1>(s) { | ||
return Some(ctx); | ||
} | ||
|
||
let (s, neg) = opt::<&str, _, Error<_>, _>(char('!'))(s).ok()?; |
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.
- let (s, neg) = opt::<&str, _, Error<_>, _>(char('!'))(s).ok()?;
+ // we need to precise the Error type, we get error[E0283]: type annotations needed
+ let (s, neg) = opt(char::<_, Error<_>>('!'))(s).ok()?;
We can put a comment and have a slightly simplex syntax
Replaced by: #12484 |
Ticket: #7513
Contribution style:
https://docs.suricata.io/en/latest/devguide/contributing/contribution-process.html
Our Contribution agreements:
https://suricata.io/about/contribution-agreement/ (note: this is only required once)
Changes (if applicable):
(including schema descriptions)
https://redmine.openinfosecfoundation.org/issues/7513
Link to ticket: https://redmine.openinfosecfoundation.org/issues/7513
Describe changes:
rfb-rules-8
SV_BRANCH=OISF/suricata-verify#2250
Previous PR = #12444