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

Tag Filtering Expressions #613

Open
SamStentz opened this issue Mar 21, 2024 · 2 comments
Open

Tag Filtering Expressions #613

SamStentz opened this issue Mar 21, 2024 · 2 comments

Comments

@SamStentz
Copy link

πŸ‘“ What did you see?

tag filtering doesn't support nesting parentheses (more of a feature), nor does it implement commutativity of boolean algebra (why I made this a bug).

source code implementation

βœ… What did you expect to see?

Parentheses and PEMDAS respect.

πŸ“¦ Which tool/library version are you using?

v0.14.0

πŸ”¬ How could we reproduce it?

could use above example in newest release.

Steps to reproduce the behavior:

  1. Install '...' version '...'
  2. Create a file called '....'
  3. Run command '....'
  4. See error '....'

example test cases that I would hope for from the unit testing

var testcases = []testcase{
        ...
	{filter: "@ten, (@one && @two)", expected: []*pickle{p2, p3}}, // evaluate `,` second by setting parentheses, a feature
	{filter: "@three && @two, @one", expected: []*pickle{p1, p2, p3}}, // evaluate `,` and `&&` left to right, a bug (current behavior would be to only pass p3)
        ...
}

πŸ“š Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

@SamStentz
Copy link
Author

Also want to thank all yall for your hard work!

@TomasPhilippart
Copy link

Hi Sam. If I understand correctly, you would like to able to have a feature that allows grouping of tag expressions? Basically have a more complete tag expression evaluator? Could you please provide some examples where this could be used? Thanks!

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

No branches or pull requests

2 participants