Man pages for lintr
A 'Linter' for R Code

absolute_path_linterAbsolute path linter
all_lintersCreate a linter configuration based on all available linters
any_duplicated_linterRequire usage of 'anyDuplicated(x) > 0' over...
any_is_na_linterRequire usage of 'anyNA(x)' over 'any(is.na(x))'
assignment_linterAssignment linter
available_lintersGet Linter metadata from a package
backport_linterBackport linter
best_practices_lintersBest practices linters
boolean_arithmetic_linterRequire usage of boolean operators over equivalent arithmetic
brace_linterBrace linter
checkstyle_outputCheckstyle Report for lint results
class_equals_linterBlock comparison of class with '=='
clear_cacheClear the lintr cache
commas_linterCommas linter
commented_code_linterCommented code linter
common_mistakes_lintersCommon mistake linters
condition_message_linterBlock usage of 'paste()' and 'paste0()' with messaging...
configurable_lintersConfigurable linters
conjunct_test_linterForce '&&' conditions to be written separately where...
consecutive_assertion_linterForce consecutive calls to assertions into just one when...
consistency_lintersConsistency linters
correctness_lintersCorrectness linters
cyclocomp_linterCyclomatic complexity linter
default_lintersDefault linters
default_settingsDefault lintr settings
default_undesirable_functionsDefault undesirable functions and operators
deprecated_lintersDeprecated linters
duplicate_argument_linterDuplicate argument linter
efficiency_lintersEfficiency linters
empty_assignment_linterBlock assignment of '{}'
equals_na_linterEquality check with NA linter
excludeExclude lines or files from linting
executing_lintersCode executing linters
expect_comparison_linterRequire usage of 'expect_gt(x, y)' over 'expect_true(x > y)'...
expect_identical_linterRequire usage of 'expect_identical(x, y)' where appropriate
expect_length_linterRequire usage of 'expect_length(x, n)' over...
expect_lintLint expectation
expect_lint_freeTest that the package is lint free
expect_named_linterRequire usage of 'expect_named(x, n)' over...
expect_not_linterRequire usage of 'expect_false(x)' over 'expect_true(!x)'
expect_null_linterRequire usage of 'expect_null' for checking 'NULL'
expect_s3_class_linterRequire usage of 'expect_s3_class()'
expect_s4_class_linterRequire usage of 'expect_s4_class(x, k)' over...
expect_true_false_linterRequire usage of 'expect_true(x)' over 'expect_equal(x,...
expect_type_linterRequire usage of 'expect_type(x, type)' over...
extraction_operator_linterExtraction operator linter
fixed_regex_linterRequire usage of 'fixed=TRUE' in regular expressions where...
for_loop_index_linterBlock usage of for loops directly overwriting the indexing...
function_argument_linterFunction argument linter
function_left_parentheses_linterFunction left parentheses linter
function_return_linterLint common mistakes/style issues cropping up from return...
get_r_stringExtract text from 'STR_CONST' nodes
get_source_expressionsParsed sourced file from a filename
ids_with_tokenGet parsed IDs by token
ifelse_censor_linterBlock usage of 'ifelse()' where 'pmin()' or 'pmax()' is more...
if_not_else_linterBlock statements like if (!A) x else y
implicit_assignment_linterAvoid implicit assignment in function calls
implicit_integer_linterImplicit integer linter
indentation_linterCheck that indentation is consistent
infix_spaces_linterInfix spaces linter
inner_combine_linterRequire 'c()' to be applied before relatively expensive...
is_lint_levelIs this an expression- or a file-level source object?
is_numeric_linterRedirect 'is.numeric(x) || is.integer(x)' to just use...
keyword_quote_linterBlock unnecessary quoting in calls
length_levels_linterRequire usage of nlevels over length(levels(.))
lengths_linterRequire usage of 'lengths()' where possible
length_test_linterCheck for a common mistake where length is applied in the...
library_call_linterLibrary call linter
line_length_linterLine length linter
lintLint a file, directory, or package
LinterCreate a 'linter' closure
lintersAvailable linters
linters_with_defaultsCreate a linter configuration based on defaults
linters_with_tagsCreate a tag-based linter configuration
lintr-deprecatedDeprecated functions in lintr
lintr-packageLintr
lint-s3Create a 'lint' object
literal_coercion_linterRequire usage of correctly-typed literals over literal...
make_linter_from_xpathCreate a linter from an XPath
matrix_apply_linterRequire usage of 'colSums(x)' or 'rowSums(x)' over 'apply(x,...
missing_argument_linterMissing argument linter
missing_package_linterMissing package linter
modify_defaultsModify lintr defaults
namespace_linterNamespace linter
nested_ifelse_linterBlock usage of nested 'ifelse()' calls
nonportable_path_linterNon-portable path linter
normalize_exclusionsNormalize lint exclusions
numeric_leading_zero_linterRequire usage of a leading zero in all fractional numerics
object_length_linterObject length linter
object_name_linterObject name linter
object_usage_linterObject usage linter
outer_negation_linterRequire usage of '!any(x)' over 'all(!x)', '!all(x)' over...
package_development_lintersPackage development linters
package_hooks_linterPackage hooks linter
paren_body_linterParenthesis before body linter
parse_exclusionsread a source file and parse all the excluded lines from it
paste_linterRaise lints for several common poor usages of 'paste()'
pipe_call_linterPipe call linter
pipe_consistency_linterPipe consistency linter
pipe_continuation_linterPipe continuation linter
pkg_testthat_lintersTestthat linters
quotes_linterCharacter string quote linter
readability_lintersReadability linters
read_settingsRead lintr settings
redundant_equals_linterBlock usage of '==', '!=' on logical vectors
redundant_ifelse_linterPrevent 'ifelse()' from being used to produce 'TRUE'/'FALSE'...
regex_subset_linterRequire usage of direct methods for subsetting strings via...
repeat_linterRepeat linter
robustness_lintersRobustness linters
routine_registration_linterIdentify unregistered native routines
sarif_outputSARIF Report for lint results
scalar_in_linterBlock usage like x %in% "a"
semicolon_linterSemicolon linter
seq_linterSequence linter
sort_linterCheck for common mistakes around sorting vectors
spaces_inside_linterSpaces inside linter
spaces_left_parentheses_linterSpaces before parentheses linter
sprintf_linterRequire correct 'sprintf()' calls
string_boundary_linterRequire usage of 'startsWith()' and 'endsWith()' over...
strings_as_factors_linterIdentify cases where 'stringsAsFactors' should be supplied...
style_lintersStyle linters
system_file_linterBlock usage of 'file.path()' with 'system.file()'
T_and_F_symbol_linter'T' and 'F' symbol linter
todo_comment_linterTODO comment linter
trailing_blank_lines_linterTrailing blank lines linter
trailing_whitespace_linterTrailing whitespace linter
undesirable_function_linterUndesirable function linter
undesirable_operator_linterUndesirable operator linter
unnecessary_concatenation_linterUnneeded concatenation linter
unnecessary_lambda_linterBlock usage of anonymous functions in iteration functions...
unnecessary_nested_if_linterAvoid unnecessary nested 'if' conditional statements
unnecessary_placeholder_linterBlock usage of pipeline placeholders if unnecessary
unreachable_code_linterBlock unreachable code and comments following return...
unused_import_linterCheck that imported packages are actually used
use_lintrUse lintr in your project
vector_logic_linterEnforce usage of scalar logical operators in conditional...
whitespace_linterWhitespace linter
xml_nodes_to_lintsConvert an XML node or nodeset into a Lint
xp_call_nameGet the name of the function matched by an XPath
yoda_test_linterBlock obvious "yoda tests"
lintr documentation built on Nov. 7, 2023, 5:07 p.m.