Skip to content

Commit 6d6f1db

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4043ada commit 6d6f1db

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

inst/hooks/exported/parsable-roxygen.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22
files <- commandArgs(trailing = TRUE)
33

44
out <- lapply(files, function(path) {
5-
65
tryCatch(
76
# Capture any messages from roxygen2:::warn_roxy()
87
msg <- capture.output(
98
roxygen2::parse_file(path, env = NULL),
109
type = "message"
1110
),
12-
11+
1312
# In case we encounter a more general file parsing problem
1413
error = function(e) {
1514
cat(c("File ", path, " is not parsable. Full context:\n"))
1615
stop(conditionMessage(e), call. = FALSE)
1716
}
1817
)
19-
18+
2019
if (length(msg) > 0) {
2120
cat(c("Roxygen commentary in file ", path, " is not parsable. Full context:\n"))
2221
stop(paste0(msg, collapse = "\n"), call. = FALSE)

0 commit comments

Comments
 (0)