You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
conjunct_test_linter: Allow to opt out of linting dplyr::filter() #2108
#2077 added support to lint logical conjunctions inside dplyr::filter() calls. Quote:
Relatedly, dplyr::filter(DF, A & B) is the same as dplyr::filter(DF, A, B), but the latter will be more readable / easier to format for long conditions.
I respectfully disagree with the "latter will be more readable" part and would like to use conjunct_test_linterwithout linting dplyr::filter() calls. Would you be willing to introduce a flag like allow_inside_dplyr_filter to opt out of this behaviour?
Activity
MichaelChirico commentedon Sep 5, 2023
I think in that sentence the emphasis is on "for long conditions". We often see code like:
In this case it's not very controversial that using
,is better:It's more of a toss-up for simple cases, like
A & BvsA, B.Anyway, happy to accept a PR. I would simply call such an argument
allow_filter.salim-b commentedon Sep 5, 2023
Yeah, but I also think
&is clearer than,in differentiating logical conjunctions from logical disjunctions (|).Cool, see #2110.
Allow to opt out of linting `filter()` in `conjunct_test_linter` (#2110)