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)

Arguments

exclude_file

character a character vector containing the files that should be excluded from static code analysis.

exclude_path

character a character vector containing the paths that should be excluded from static code analysis.

Value

none

Details

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.

Examples

if (FALSE) {
setup_lintr(exclude_file = "manuscript.Rmd", exclude_path = c("data", "sources"))
}