-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Labels
featurea feature request or enhancementa feature request or enhancement
Description
Follow-up to #1579
Extend boolean_arithmetic_linter() to include all()-alike expressions like sum(x == y) == length(x) --> all(x == y).
The issues are
- we can't just test for
length()on the RHS (e.g.sum(x == y) == length(z)could be totally different) - looking for
sum(x == y) == length(x == y)(i.e., exact expression matching, which we do in some other places) will only find a particularly silly manifestation of the issue - there is a bit of a combinatorial explosion if we have to look for any symbol found inside the logical expression on the RHS (e.g.
sum(x == y) == [length(x) _or_ length(y)]).
A first pass would be to check how many hits there are for the naive version (i.e., condition 1), to see how worth investing in this complicated logic is to begin with.
Metadata
Metadata
Assignees
Labels
featurea feature request or enhancementa feature request or enhancement