-
-
Notifications
You must be signed in to change notification settings - Fork 218
Description
@dmurdoch just sent a mass email to maintainers:
To maintainers of a number of CRAN packages:
I just did a search through CRAN source code for possible problems in the use
ofreturn()
in R packages. Unlike C, in R return() is a function; if you have
code like
if (condition) return;
the function won't be called, so execution will continue to the next line.
Your packages appear to have some instances of that usage, shown below. Some
of these may be false positives (e.g. you used "return" as a local variable
name), but I think most of them are bugs. Please take a look,
and if changes are needed, submit a revised version to CRAN.
and further down has this snippet:
./Rcpp/R/Attributes.R : 620 if (is.null(value) || !nzchar(value))
./Rcpp/R/Attributes.R : 621 return;
I think he got us. The full segment is here and I think we should indeed make that return(NULL)
.
PR coming in a moment.