-
Notifications
You must be signed in to change notification settings - Fork 496
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
Allow to add a description for every feature #39
Conversation
I am thinking that it would be a good idea to use a different color for all the addresses. This would also help making clearer which the comment is. @williballenthin @mr-tz @mike-hunhoff what do you think? 🤔 |
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.
nice, can you please add tests showing all features support descriptions now as expected
That's a great idea! 👍 However I am not sure how to test it. I could write a tests in |
7f08d3e
to
543e424
Compare
With this changes the json for characteristic looks like: And the output with the I would however change it to for consistency with other features. For example: |
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.
muchas gracias!
For now testing if the parsing for all features works should be good. This could be done in |
Yes, I like the consistent format for the JSON. Didn't we try to remove the True part before when displaying? May be related to #39 (comment)? |
It was actually removed from the But I think I got it wrong. Maybe he meant the json... but shouldn't we remove it from the json if it is only used internally? |
for -vv format, i think the best case is i think this one is ok: in the json, i'd like to see the does this make sense? is it reasonable? |
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.
characteristic changes almost identical to #63! see comments, not sure how to best deal with this race-condition 😄
Enable associate context for all features. This was called symbol before and only enabled for `number`, `offset` and `bytes`. This is not enabled for strings with regular expressions, as they are not a feature.
I finished the deletion of I have also added support for inline descriptions in |
There are still a few things missing related to this PR, but I would prefer to merge this first and open issues/PRs for them afterwards:
This PR is modifying/refactoring core parts of code and the merge of almost any other PR causes merge conflicts. |
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.
see my comments, otherwise looks good to me
As the `__str__` method is not used anymore in the output, the description implementation needs to be adapted.
Get rid of `True` in characteristic (rules, output and json) as it is implicit. This way, the same syntax is used for characteristic as for the rest of the features. Co-authored-by: William Ballenthin <william.ballenthin@fireeye.com>
``` count(number(2 = AF_INET/SOCK_DGRAM)): 2 ```
Test if the parsing of feature succeeds with every time of description.
🪂 |
💃 |
Enable associate context for all features. This was called symbol before and only enabled for
number
,offset
andbytes
. Example:Inline syntax is not supported for strings.
This is not enabled for strings with regular expressions, as they are not a feature. It is needed to either make RegExp a feature or implement this for RegExp as well. I haven't implement this yet because I have some things to discuss about this implementation. I'll add it once is this is clarified (it can be as part of this PR or a different one).
Closes #5