lint_with_style {adaptalint}R Documentation

Lint a file, using a known style

Description

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

Usage

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

# 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)

[Package adaptalint version 0.2.4 Index]