Skip to content

Commit 9af53f1

Browse files
Condense lint_dir(patterns=) default (#2174)
* use literal regex for pattern= argument * TODO --------- Co-authored-by: AshesITR <[email protected]>
1 parent 20fcc05 commit 9af53f1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

R/lint.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ lint <- function(filename, linters = NULL, ..., cache = FALSE, parse_settings =
130130
lint_dir <- function(path = ".", ...,
131131
relative_path = TRUE,
132132
exclusions = list("renv", "packrat"),
133-
pattern = rex(".", or(group(one_of("Rr"), or("", "html", "md", "nw", "rst", "tex", "txt")),
134-
group(one_of("Qq"), "md")), end),
133+
# TODO(r-lib/rex#85): Re-write in case-sensitive rex()
134+
pattern = "(?i)[.](r|rmd|qmd|rnw|rhtml|rrst|rtex|rtxt)$",
135135
parse_settings = TRUE,
136136
show_progress = NULL) {
137137
if (has_positional_logical(list(...))) {

man/lint.Rd

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)