[R-pkg-devel] Formatting .Rbuildignore

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Mon Aug 17 18:46:58 CEST 2020

On Mon, 17 Aug 2020 15:56:07 +0200
Thierry Onkelinx <thierry.onkelinx using inbo.be> wrote:

> Can we add blank lines in .Rbuildignore? Or lines with only comments
> (line starting with #)?

.Rbuildignore is not documented [1] to allow comments, but the
current implementation does skip empty lines [2] since 2010 [3]
(otherwise empty regular expressions would match all file names).

It could be possible to get away with comment lines, since the
resulting regular expressions are unlikely to ever match anything, but
it would cost CPU cycles to match every file name against every
regular expression, and some regular expressions may turn out to be
really expensive on some inputs [4].

I think that it's best not to try to add comments to .Rbuildignore, and
to avoid blank lines unless not having them becomes really inconvenient.

Best regards,




[4] https://en.wikipedia.org/wiki/ReDoS

More information about the R-package-devel mailing list