You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should contain only (ASCII) letters, numbers and dot, have at least two characters and start with a letter and not end in a dot
so my understanding is that ^ and $ are missing in valid_package_name_regexp (and so in standard_regexps()$valid_package_name)
valid_package_name2<-function(name) {
# This is the algorithm used in R CMD check at# https://github.com/wch/r-source/blob/a3a73a730962fa214b4af0ded55b497fb5688b8b/src/library/tools/R/QC.R#L3214valid<-TRUE# check for a package called 'R'res<-if (tolower(name) =="r") {
FALSE
} else {
grepl(glue::glue("^{valid_package_name_regexp}$"), name)
}
structure(res, class="available_valid_name")
}
Here are two examples where I think
valid_package_name()
is misbehaving.According to https://cran.r-project.org/doc/manuals/r-release/R-exts.html#The-DESCRIPTION-file
so my understanding is that
^
and$
are missing invalid_package_name_regexp
(and so instandard_regexps()$valid_package_name
)now
If this is right and useful, I can create a PR.
The text was updated successfully, but these errors were encountered: