Skip to content

Tag Filtering ExpressionsΒ #613

Open
Open
@SamStentz

Description

@SamStentz

πŸ‘“ 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions