Skip to content

Commit aa41295

Browse files
committed
Fix GHA issues
1 parent 56a574e commit aa41295

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

R/make_linelist.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ make_linelist <- function(x,
127127
checkmate::assert_logical(strict)
128128
checkmate::assert_logical(allow_extra)
129129

130-
args <- rlang::list2(...)
130+
labs <- rlang::list2(...)
131131

132132
# We replace default values with user-provided ones, and then
133133
# tag each variable in turn. Validation the tagged variables is done
134134
# elsewhere.
135135
lbl <- modify_defaults(label_defaults(),
136-
args,
136+
labs,
137137
allow_extra = allow_extra
138138
)
139139
# Retain only those lbl list values whose name is present in x if !strict

R/modify_defaults.R

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ modify_defaults <- function(defaults, x, allow_extra = FALSE) {
2828
# 2. Replace the names in defaults, of those matching elements, with the names
2929
# of the matching elements in x
3030
for (label in matching_labels) {
31-
match <- defaults == label
31+
matchDefaults <- defaults == label
3232
matchX <- x == label
33-
if (sum(match) > 1) stop("Duplicates present for default labels. Please
34-
provide unique variables for labels and remove any
35-
duplicates.")
36-
names(result)[match] <- names(x)[matchX]
33+
if (sum(matchDefaults) > 1) stop("Duplicates present for default labels.
34+
Please provide unique variables for labels and
35+
remove any duplicates.", call. = FALSE)
36+
names(result)[matchDefaults] <- names(x)[matchX]
3737
}
3838

3939
# 3. If allow_extra is FALSE and there are elements in x that are not in
@@ -42,7 +42,8 @@ modify_defaults <- function(defaults, x, allow_extra = FALSE) {
4242
extra_elements <- setdiff(unlist(x), unlist(defaults))
4343
if (length(extra_elements) > 0) {
4444
stop(
45-
"There are labels in x that are not defaults and allow_extra is FALSE"
45+
"There are labels in x that are not defaults and allow_extra is FALSE",
46+
call. = FALSE
4647
)
4748
}
4849
}

inst/WORDLIST

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,22 @@ ORCID
66
PII
77
R's
88
RECON
9+
RStudio
910
SaMD
1011
codecov
1112
conceptor
1213
cran
1314
dplyr
1415
epi
1516
etc
17+
favor
1618
github
1719
lifecycle
1820
linelists
1921
pkgdown
2022
rlang
2123
rlang's
24+
safeframe
2225
testthat
2326
tidyselect
2427
tidyverse

tests/testthat/Rplots.pdf

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)