Skip to content

Commit 9f8255c

Browse files
committed
in skeleton generator wrap any() around grepl() to suppress warning
1 parent cfbf62f commit 9f8255c

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2021-01-02 Dirk Eddelbuettel <[email protected]>
2+
3+
* R/Rcpp.package.skeleton.R: Wrap any() around grepl()
4+
15
2020-12-22 Dirk Eddelbuettel <[email protected]>
26

37
* .github/workflows/stale.yaml: Adding a staleness monitor labeling

R/Rcpp.package.skeleton.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Rcpp.package.skeleton <- function(name = "anRpackage", list = character(),
9999
NAMESPACE <- file.path(root, "NAMESPACE")
100100
lines <- readLines(NAMESPACE)
101101
ns <- file(NAMESPACE, open="w")
102-
if (! grepl("useDynLib", lines)) {
102+
if (!any(grepl("useDynLib", lines))) {
103103
if (getRversion() >= "3.4.0") {
104104
lines <- c(sprintf( "useDynLib(%s, .registration=TRUE)", name), lines)
105105
} else {

inst/NEWS.Rd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@
2222
}
2323
\item Changes in Rcpp Documentation:
2424
\itemize{
25-
\item Several URLs were updated to https and/or new addresses (Dirk)
25+
\item Several URLs were updated to https and/or new addresses (Dirk).
2626
}
2727
\item Changes in Rcpp Deployment:
2828
\itemize{
2929
\item Added GitHub Actions CI using the same container-based setup
3030
used previously, and also carried code coverage over (Dirk in
3131
\ghpr{1128}).
3232
}
33+
\item Changes in Rcpp support functions:
34+
\itemize{
35+
\item \code{Rcpp.package.skeleton()} avoids warning from R. (Dirk)
36+
}
3337
}
3438
}
3539

0 commit comments

Comments
 (0)