Create a linter from an XPathSource:
Create a linter from an XPath
The message to be included as the
lint_messageis a character vector the same length as
i-th lint will be given the
type of lint.
Which level of expression is being tested?
"expression"means an individual expression, while
"file"means all expressions in the current file are available.
number_linter <- make_linter_from_xpath("//NUM_CONST", "This is a number.") lint(text = "1 + 2", linters = number_linter()) #> ::warning file=<text>,line=1,col=1::file=<text>,line=1,col=1,[number_linter] This is a number. #> ::warning file=<text>,line=1,col=5::file=<text>,line=1,col=5,[number_linter] This is a number.