0

我正在使用lintr包来检查我的包中是否与 tidyverse 编码标准不一致。但是,我正在处理的问题是,即使在我不想让他检查的 roxygen 文档中,lintr 包也会引发每行超过 80 个字符的问题。

因此,例如 lintr 包将通过Lines should not be more than 80 characters错误

#' @description This a description for very good function which does a lot of good things and it's not so long as this description.

我的问题是 - 我如何忽略文档中行数超过 80 个字符的所有标记(在处理普通代码时,我仍然希望对长行进行评论)。

4

1 回答 1

0

我不认为lintr有那么好的控制水平(尽管我想你可以提交一个 PR 来做到这一点)。但是没有必要有这么长的文档行;如果您将其格式化为多行,您的描述会正常工作,例如

#' @description 
#' This a description for very good function which does a lot of good things
#' and it's not so long as this description.
于 2021-05-26T11:59:05.427 回答