Skip to content

Unhelpful Error Message for linting #1725

@franperic

Description

@franperic

With the update to lintr 3.0.1 I receive the following error message:

Error in if (allow_cascading_assign) "" else "[text() = '<-']" : 
  argument is not interpretable as logical
In addition: Warning message:
In if (allow_cascading_assign) "" else "[text() = '<-']" :
  the condition has length > 1 and only the first element will be used

Unfortunately, the error message is not very helpful and I didn´t find any information online.
Is this a problem with lintr 3.0.1 or is my .lintr file badly specified.

Here my .lintr file:

linters: linters_with_defaults(
  line_length_linter               = line_length_linter(100),
  T_and_F_symbol_linter            = lintr::T_and_F_symbol_linter,
  assignment_linter                = lintr::assignment_linter,
  closed_curly_linter              = lintr::brace_linter(allow_single_line = FALSE),
  commas_linter                    = lintr::commas_linter,
  commented_code_linter            = lintr::commented_code_linter,
  cyclocomp_linter                 = lintr::cyclocomp_linter(complexity_limit = 25),
  object_name_linter               = lintr::object_name_linter(styles = c("snake_case", "camelCase", "CamelCase", "SNAKE_CASE")),
  object_length_linter             = lintr::object_length_linter(length = 30L),
  equals_na_linter                 = lintr::equals_na_linter,
  function_left_parentheses_linter = lintr::function_left_parentheses_linter,
  infix_spaces_linter              = lintr::infix_spaces_linter,
  no_tab_linter                    = lintr::no_tab_linter,
  paren_brace_linter               = lintr::paren_brace_linter,
  absolute_path_linter             = lintr::absolute_path_linter(lax = TRUE),
  nonportable_path_linter          = lintr::nonportable_path_linter(lax = TRUE),
  pipe_continuation_linter         = lintr::pipe_continuation_linter,
  semicolon_terminator_linter      = lintr::semicolon_linter(allow_compound = FALSE, allow_trailing = FALSE),
  seq_linter                       = lintr::seq_linter,
  single_quotes_linter             = lintr::single_quotes_linter,
  spaces_inside_linter             = lintr::spaces_inside_linter,
  spaces_left_parentheses_linter   = lintr::spaces_left_parentheses_linter,
  undesirable_function_linter      = lintr::undesirable_function_linter(fun = lintr::default_undesirable_functions),
  undesirable_operator_linter      = lintr::undesirable_operator_linter(op = lintr::default_undesirable_operators),
  unneeded_concatenation_linter    = lintr::unneeded_concatenation_linter
  )
exclusions: list("file_to_exclude.R", "another_file_to_exclude.R")
exclude: "# Exclude Linting"
exclude_start: "# Begin Exclude Linting"
exclude_end: "# End Exclude Linting"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions