tests/testthat/dummy_packages/RConfig/R/lint_me.R

# config excludes assignment_linter() so this doesn't lint
a = 1
# default config includes infix_spaces_linter() so this lints
b=a + 2
# config extends defaults with any_duplicated_linter() so this lints
any(duplicated(b))
# custom exclude setting is also picked up so this doesn't lint
1+1 # NOLINT

Try the lintr package in your browser

Any scripts or data that you put into this service are public.

lintr documentation built on Nov. 7, 2023, 5:07 p.m.