Description Usage Arguments Functions
Available linters
1 | arrow_lintr(source_file)
|
source_file |
returned by |
T_and_F_symbol_linter
: Avoid the symbols T
and F
(for TRUE
and FALSE
).
assignment_linter
: checks that '<-' is always used for assignment
closed_curly_linter
: check that closed curly braces should always be on their
own line unless they follow an else.
commas_linter
: check that all commas are followed by spaces, but do not
have spaces before them.
commented_code_linter
: Check that there is no commented code outside roxygen
blocks
todo_comment_linter
: Check that the source contains no TODO comments (case-insensitive).
cyclocomp_linter
: Check for overly complicated expressions. See
cyclocomp
.
object_name_linter
: Check that object names conform to a naming style.
object_length_linter
: check that object names are not too long.
camel_case_linter
: check that objects are not in camelCase.
equals_na_linter
: that checks for x == NA
extraction_operator_linter
: Check that the '[[' operator is used when extracting a single element from
an object, not '[' (subsetting) nor '$' (interactive use).
function_left_parentheses_linter
: check that all left parentheses in a function call
do not have spaces before them.
implicit_integer_linter
: Check that integers are explicitly typed using the form 1L
instead of
1
.
infix_spaces_linter
: check that all infix operators have spaces around them.
line_length_linter
: check the line length of both comments and code is less
than length.
no_tab_linter
: check that only spaces are used for indentation, not tabs.
object_usage_linter
: checks that closures have the proper usage using
checkUsage
. Note this runs
eval
on the code, so do not use with untrusted code.
open_curly_linter
: check that opening curly braces are never on their own
line and are always followed by a newline.
paren_brace_linter
: check that there is a space between right
parenthesis and an opening curly brace.
absolute_path_linter
: Check that no absolute paths are used (e.g. "/var", "C:\System", "~/docs").
nonportable_path_linter
: Check that file.path() is used to construct safe and portable paths.
pipe_continuation_linter
: Check that each step in a pipeline is on a new line, or
the entire pipe fits on one line.
semicolon_terminator_linter
: Check that no semicolons terminate statements.
seq_linter
: check for 1:length(...)
, 1:nrow(...)
,
1:ncol(...)
, 1:NROW(...)
and 1:NCOL(...)
expressions. These often cause bugs when the right hand side is zero.
It is safer to use seq_len
or
seq_along
instead.
single_quotes_linter
: checks that only single quotes are used to delimit
string constants.
spaces_inside_linter
: check that parentheses and square brackets do not have
spaces directly inside them.
spaces_left_parentheses_linter
: check that all left parentheses have a space before them
unless they are in a function call.
trailing_blank_lines_linter
: check there are no trailing blank lines.
trailing_whitespace_linter
: check there are no trailing whitespace characters.
undesirable_function_linter
: Report the use of undesirable functions, e.g. return
, options
,
or sapply
and suggest an alternative.
undesirable_operator_linter
: Report the use of undesirable operators, e.g. `:::`
or `<<-`
and suggest an alternative.
unneeded_concatenation_linter
: Check that the c
function is not used without arguments nor with a
single constant.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.