Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sprintf warnings in R-devel (CRAN check) #60

Closed
aryoda opened this issue Oct 24, 2020 · 3 comments
Closed

Fix sprintf warnings in R-devel (CRAN check) #60

aryoda opened this issue Oct 24, 2020 · 3 comments

Comments

@aryoda
Copy link
Owner

aryoda commented Oct 24, 2020

See email from Prof. Brian Ripley (Oct 23, 2020):

CRAN packages with sprintf warnings in R-devel:

That is

CodeDepends DescTools FluMoDL GmAMisc LOGICOIL ODB Publish
R.utils anytime aos aroma.core assertive.datetimes colt dbmss dbstats
doFuture easyDes ecespa ems fastJT fun future future.BatchJobs
future.apply future.batchtools future.callr geojsonio ggedit globals
highlight huxtable jtGWAS jwutil knitLatex ldaPrototype lfe listenv
logmult matlib meteR mlr mlrMBO move munsellinterpol nets
nvmix odin openxlsx parallelly pkgmaker plfMA pomp progressr rdlocrand
rioja salso scan sjstats smacpod spatialEco spatialsegregation
spatstat stablelearner sybil tcpl tinyProject tinytest tryCatchLog
tsdecomp vetr xgboost

R-devel has a new runtime check in sprintf() that all arguments are used
by the format and this is showing one or more warnings in the checks of
these packages, usually in the examples. E.g.

Warning in sprintf("%s$", extension, ignore.case = TRUE) :
argument not used by format
Warning in sprintf("%s", getFunctionLinks(tokens[w]),
tokens[w], :
argument not used by format

Please investigate (by running R CMD check with the latest R-devel and
grepping the .Rcheck directory). In some cases the warning seems to be
from another package, usually one with the same maintainer. If from one
not on this list, please let CRAN and its maintainer know. If you think
this is a false positive, please contact Tomas Kalibera (in Cc:).

@aryoda
Copy link
Owner Author

aryoda commented Oct 27, 2020

First analysis: The offending line may be:

res <- sprintf("%s [%s] %s\n", severity.level, log.time, msg, "\n")

The trailing new line is a stupid mistake ;-)

@aryoda
Copy link
Owner Author

aryoda commented Oct 27, 2020

Update: CI/CD for R-devel indeed shows

> tryCatchLog:::log2console("WARN", "this is my last warning")
Warning in sprintf("%s [%s] %s\n", severity.level, log.time, msg, "\n") :
  one argument not used by format '%s [%s] %s
'
WARN [2020-10-27 08:44:47] this is my last warning

in the tryCatchLog-Ex.Rout file

@aryoda
Copy link
Owner Author

aryoda commented Nov 25, 2020

Fixed in version 1.2.0

@aryoda aryoda closed this as completed Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant