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

dealing with the curly-curly operator #388

Closed
IndrajeetPatil opened this issue Jun 30, 2019 · 2 comments
Closed

dealing with the curly-curly operator #388

IndrajeetPatil opened this issue Jun 30, 2019 · 2 comments
Labels
feature a feature request or enhancement

Comments

@IndrajeetPatil
Copy link
Collaborator

The {{ operator (as alternative to !! + enquo) was introduced in rlang 0.4.0 (https://www.tidyverse.org/articles/2019/06/rlang-0-4-0/) and I've started using this new operator in my packages.

But now lintr treats this as a lint and my PR builds are flooded with lintr-bot comments:
IndrajeetPatil/ggstatsplot#255 (comment)

image

Any way to make sure that this is not counted as a lint?

@russHyde russHyde added the feature a feature request or enhancement label Jul 1, 2019
@russHyde
Copy link
Collaborator

russHyde commented Jul 1, 2019

By adding

linters: with_defaults(open_curly_linter = NULL, closed_curly_linter = NULL)

to the .lintr file for your package you can turn off this pair of linters.

@russHyde russHyde removed the feature a feature request or enhancement label Jul 1, 2019
@russHyde
Copy link
Collaborator

russHyde commented Jul 1, 2019

Alternatively, I think you could use
linters: with_defaults(open_curly_linter = open_curly_linter(allow_single_line = TRUE), closed_curly_linter = closed_curly_linter(allow_single_line = TRUE))

This would allow you to use {{ some_columns }} and if (something) {this()} else {that()}
but would still catch other curly-brace-related lints. [Proposed but never used]

@jimhester jimhester added the feature a feature request or enhancement label Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants