Skip to content

Commit

Permalink
fix: Allow for (( when linting. Fixes #259
Browse files Browse the repository at this point in the history
  • Loading branch information
nathaneastwood authored and jimhester committed Mar 9, 2018
1 parent e926089 commit 715f005
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
* Permit single quotes if they quote literal double quotes (#28, @jackwasey)
* # nolint comments are respected with caching (#68, @krlmlr)
* Properly handle all knitr document formats
* Allow for (( when linting (#259, @nathaneastwood)

# lintr 0.2.0 #

Expand Down
2 changes: 1 addition & 1 deletion R/spaces_left_parentheses_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spaces_left_parentheses_linter <- function(source_file) {
before_operator <- substr(line, parsed$col1 - 1L, parsed$col1 - 1L)

non_space_before <- re_matches(before_operator, rex(non_space))
not_exception <- !(before_operator %in% c("!", ":", "["))
not_exception <- !(before_operator %in% c("!", ":", "[", "("))

if (non_space_before && not_exception) {
Lint(
Expand Down

0 comments on commit 715f005

Please sign in to comment.