lintr icon indicating copy to clipboard operation
lintr copied to clipboard

Extensions for system_file_linter to block '/' for robustness

Open MichaelChirico opened this issue 2 years ago • 2 comments

Related: Prevent literals with / or \ in them for file.path and system.file. Should check path linters if they know system.file.

Originally posted by @AshesITR in https://github.com/r-lib/lintr/issues/1006#issuecomment-1080359185

MichaelChirico avatar Mar 28 '22 08:03 MichaelChirico

Also related: our PasteFilePathLinter() from #884 which didn't make the 3.0.0 cut:

PasteFilePathLinter - Block usage of paste() with sep='/'

MichaelChirico avatar Mar 28 '22 08:03 MichaelChirico

Although sep = "/" in general paste() calls could be okay, e.g. for constructing REST endpoint URLs which are not file paths imo.

AshesITR avatar Mar 28 '22 08:03 AshesITR