Skip to content

Commit 80d2e7e

Browse files
committed
Support DESCRIPTION.in files
1 parent d9d0760 commit 80d2e7e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

R/spell-check.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ spell_check_package <- function(pkg = ".", vignettes = TRUE, lang = "en_GB", use
6969
as_package <- function(pkg){
7070
if(inherits(pkg, 'package'))
7171
return(pkg)
72-
description <- normalizePath(file.path(pkg, "DESCRIPTION"), mustWork = TRUE)
72+
path <- pkg
73+
description <- if(!file.exists(file.path(path, "DESCRIPTION")) && file.exists(file.path(path, "DESCRIPTION.in"))){
74+
file.path(path, "DESCRIPTION.in")
75+
} else {
76+
normalizePath(file.path(path, "DESCRIPTION"), mustWork = TRUE)
77+
}
7378
pkg <- as.list(read.dcf(description)[1,])
7479
names(pkg) <- tolower(names(pkg))
7580
pkg$path <- dirname(description)

0 commit comments

Comments
 (0)