lintr (version 1.0.3)

expect_lint: Lint expectation

Description

Lint expectation

Usage

expect_lint(content, checks, ..., file = NULL)

Arguments

content

the file content to be linted

checks

a list of named vectors of checks to be performed. Performs different checks depending on the value of checks.

  • NULL check if the lint returns no lints.

  • unnamed-vector check if the lint's message matches the value.

  • named-vector check if the lint's field matches the named field.

  • list-vectors check if the given lint matches (use if more than one lint is returned for the content)

...

one or more linters to use for the check

file

if not NULL read content from a file rather than from content