lintr icon indicating copy to clipboard operation
lintr copied to clipboard

[new lint] Empty first line in roxy examples

Open pawelru opened this issue 6 months ago • 1 comments

Only after https://github.com/r-lib/lintr/issues/265

Empty lines following #' @examples roxygen tag are actually being rendered out. This is oftentimes confused with code-formatting within roxygen when blank lines got ignored.

Anti pattern (file foo.R):

#' @examples
#'
#' foo()

Which results into the following (file foo.Rd):

\examples{

foo()

Whereas it should be:

#' @examples
#' foo()

pawelru avatar Feb 14 '24 10:02 pawelru