Skip to content

Commit

Permalink
mnt: Use rex for regex escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
MEO265 committed Dec 6, 2023
1 parent fdb2307 commit ee7c47c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/use_lintr.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ use_lintr <- function(path = ".", type = c("tidyverse", "full")) {
ignore <- trimws(readLines(ignore_path, warn = FALSE))
ignore <- ignore[nzchar(ignore)]
if (!any(vapply(ignore, function(x) grepl(rel_path, pattern = x, perl = TRUE, ignore.case = TRUE), logical(1L)))) {
cat(file = ignore_path, paste0("^", rel_path, "$"), "\n", append = TRUE)
cat(file = ignore_path, rex::rex(start, rel_path, end), sep = "\n", append = TRUE)
}
}

Expand Down

0 comments on commit ee7c47c

Please sign in to comment.