Skip to content

Commit

Permalink
use in infix_spaces_linter()
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Aug 2, 2023
1 parent 3d8152f commit d4e93e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/infix_spaces_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ infix_spaces_linter <- function(exclude_operators = NULL, allow_multiple_spaces
# NB: parent::*[count(expr | SYMBOL_SUB)) > 1] for the unary case, e.g. x[-1]
# SYMBOL_SUB for case with missing argument like alist(a =)
# NB: the last not() disables lints inside box::use() declarations
xpath <- paste(collapse = "|", glue::glue("//{infix_tokens}[
global_xpath <- paste0('//', infix_tokens, collapse = '|')

Check warning on line 150 in R/infix_spaces_linter.R

View workflow job for this annotation

GitHub Actions / lint

file=R/infix_spaces_linter.R,line=150,col=26,[quotes_linter] Only use double-quotes.

Check warning on line 150 in R/infix_spaces_linter.R

View workflow job for this annotation

GitHub Actions / lint

file=R/infix_spaces_linter.R,line=150,col=57,[quotes_linter] Only use double-quotes.

Check warning on line 150 in R/infix_spaces_linter.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/infix_spaces_linter.R,line=150,col=26,[quotes_linter] Only use double-quotes.

Check warning on line 150 in R/infix_spaces_linter.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/infix_spaces_linter.R,line=150,col=57,[quotes_linter] Only use double-quotes.
xpath <- glue::glue("({global_xpath})[
parent::*[count(expr | SYMBOL_SUB) > 1]
and (
(
Expand All @@ -166,7 +167,7 @@ infix_spaces_linter <- function(exclude_operators = NULL, allow_multiple_spaces
]
]
)
]"))
]")

Linter(function(source_expression) {
if (!is_lint_level(source_expression, "expression")) {
Expand Down

0 comments on commit d4e93e1

Please sign in to comment.