lint_with_style: Lint a file, using a known style

Description Usage Arguments Examples

View source: R/styles.R

Description

Apply a style extracted using extract_style: lint a file, checking only for errors that appear to be prohibited in that style.

Usage

1
lint_with_style(filename, style, threshold = 0.01)

Arguments

filename

path to the file to check

style

a style data frame, as created by extract_style

threshold

the proportional occurrence threshold above which a lint is ignored

Examples

1
2
3
4
5
6
7
8
# Get a copy of the profile of lints from the purrr package
data("style_purrr")

# Get the path to a file to check
path <- system.file("extdata", 'styles.R', package='adaptalint')

# Check this file against the lint profile of purrr
lint_with_style(filename = path, style = style_purrr)

adaptalint documentation built on Oct. 5, 2019, 9:05 a.m.