This function create a config file (.lintr
) in root of the user's project
based on static code analysis performed by the `lintr.
setup_lintr(exclude_file = NULL, exclude_path = NULL)
character a character vector containing the files that should be excluded from static code analysis.
character a character vector containing the paths that should be excluded from static code analysis.
none
setup_lint
creates a file (.lintr
) in the root of the user project,
which lists and counts the warnings, syntax errors, and possible semantic
issues provided by the static code analysis of the {lintr}
. In the current
form (i.e., right after its creation), the .lintr
file will block all the
problems and hints founded by the static code analysis. Users need to edit
the file manually, changing the variable values from NULL to the value used
by each type of linter listed. For example, the default value of the
line_length_linter
linter is 80, but users can change it to 120. Please,
check the README
of the {lintr}
for further information.
if (FALSE) {
setup_lintr(exclude_file = "manuscript.Rmd", exclude_path = c("data", "sources"))
}