[R-pkg-devel] Get WARNING in R CMD check from warning in test code?

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Mon Apr 26 15:02:06 CEST 2021


On 26/04/2021 8:55 a.m., Duncan Murdoch wrote:
> I had been under the mistaken impression that warnings in test code
> would lead to NOTEs or WARNINGs in R CMD check, but they are ignored.
> 
> I think the only outcomes from running test code are OK or ERROR, the
> latter happening when R exits with a non-zero status, as it does by
> default when there's a call to stop() in the test code.
> 
> Am I wrong about this?  Is there a way to put something executable in
> the test script that will generate a WARNING in R CMD check when executed?
> 
> The closest I can seem to get is to include *.Rout.save, which generates
> a NOTE if it doesn't match, and is fairly inconvenient to keep up to date.

Oops, wrong again.  It's a message in the check log, but it leaves the 
status as OK.

> 
> Duncan Murdoch
>



More information about the R-package-devel mailing list