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

README: expand on the textual form of filters #107

Merged
merged 4 commits into from
May 21, 2020
Merged

Conversation

Artoria2e5
Copy link
Contributor

Add information on groups and evaluation order.

Add information on groups and evaluation order.
@Querz
Copy link
Owner

Querz commented May 19, 2020

The filters do indeed work from left to right, but they still respect the "AND before OR"-rule.
Using your example A and B or C and D, it actually checks A and B first and if that is true, it skips the rest (that's how it works in most programming languages as far as i know).
Let's assume the following:
A = true, B = true, C = false, D = false.
Now A and B or C and D must return true, because A and B is true and we don't care about C and D, but (((A and B) or C) and D) from your example would return false.

Digging deeper into the actual code that performs those checks, I did find a bug when it tests if the query actually applies to a region file. See the Notice at the end of the Chunk filter section in the Readme.
I fixed this bug here, it will be available in the next release.

@Artoria2e5
Copy link
Contributor Author

Artoria2e5 commented May 21, 2020

Oops, you are right about the rule thing. I bumped into those sort of evaluation rules in sh, so I was assuming that mcaseelctor did the same.

@Querz Querz merged commit a9e1d67 into Querz:master May 21, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants