make_linter_from_xpath {lintr} | R Documentation |
Create a linter from an XPath
Description
Create a linter from an XPath
Usage
make_linter_from_xpath(
xpath,
lint_message,
type = c("warning", "style", "error"),
level = c("expression", "file")
)
Arguments
xpath |
Character string, an XPath identifying R code to lint.
See |
lint_message |
The message to be included as the |
type |
type of lint. |
level |
Which level of expression is being tested? |
Examples
number_linter <- make_linter_from_xpath("//NUM_CONST", "This is a number.")
lint(text = "1 + 2", linters = number_linter())
[Package lintr version 3.1.2 Index]