Skip to content

Commit e043ecf

Browse files
always ignore case, search recursively, include hidden files
1 parent a58a411 commit e043ecf

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

R/ui-styling.R

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,35 +118,30 @@ prettify_pkg <- function(transformers,
118118
if ("\\.r" %in% filetype) {
119119
r_files <- dir_without_.(
120120
path = without_excluded(c("R", "tests", "data-raw", "demo")),
121-
pattern = "\\.r$",
122-
ignore.case = TRUE,
123-
recursive = TRUE
121+
pattern = "\\.r$"
124122
)
125123
}
126124

127125
if ("\\.rprofile" %in% filetype) {
128126
rprofile_files <- dir_without_.(
129-
path = without_excluded("."), pattern = "^\\.rprofile$",
130-
ignore.case = TRUE, recursive = FALSE, all.files = TRUE
127+
path = without_excluded("."), pattern = "^\\.rprofile$"
131128
)
132129
}
133130
if ("\\.rmd" %in% filetype) {
134131
vignette_files <- dir_without_.(
135-
path = without_excluded("vignettes"), pattern = "\\.rmd$",
136-
ignore.case = TRUE, recursive = TRUE
132+
path = without_excluded("vignettes"), pattern = "\\.rmd$"
137133
)
138134
readme <- dir_without_.(
139135
path = ".",
140-
pattern = without_excluded("^readme\\.rmd$"), ignore.case = TRUE
136+
pattern = without_excluded("^readme\\.rmd$")
141137
)
142138
}
143139

144140
if ("\\.rnw" %in% filetype) {
145141
vignette_files <- append(
146142
vignette_files,
147143
dir_without_.(
148-
path = without_excluded("vignettes"), pattern = "\\.rnw$",
149-
ignore.case = TRUE, recursive = TRUE
144+
path = without_excluded("vignettes"), pattern = "\\.rnw$"
150145
)
151146
)
152147
}

R/utils-files.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ dir_without_._one <- function(path, ...) {
4949
relative <- dir(
5050
path = path,
5151
full.names = FALSE,
52+
ignore.case = TRUE,
53+
recursive = TRUE,
54+
all.files = TRUE,
5255
...
5356
)
5457
if (path == ".") {

0 commit comments

Comments
 (0)