Skip to content

[Dev][R] Update code to match new linters on lintr=3.2.0 #45536

Closed

Description

@raulcd

Describe the bug, including details regarding any error messages, version, and platform.

The upgrade from lintr 3.1.2 to 3.2.0 brought up some changes due to some linters being added as required.
When we tried to fix CI (due to cyclocomp not being available anymore) we started getting several failures:

 Error: Error: Not lint free
R/arrow-info.R:87:5: style: [return_linter] Use implicit return behavior; explicit return() is not needed.
    return(FALSE)
    ^~~~~~
R/arrow-info.R:95:5: style: [return_linter] Use implicit return behavior; explicit return() is not needed.
    return(FALSE)
    ^~~~~~
R/arrow-info.R:103:5: style: [return_linter] Use implicit return behavior; explicit return() is not needed.
    return(FALSE)
    ^~~~~~
R/arrow-info.R:111:5: style: [return_linter] Use implicit return behavior; explicit return() is not needed.
    return(FALSE)
    ^~~~~~
R/arrow-info.R:119:5: style: [return_linter] Use implicit return behavior; explicit return() is not needed.
    return(FALSE)
    ^~~~~~
R/arrow-info.R:127:5: style: [return_linter] Use implicit return behavior; explicit return() is not needed.
    return(FALSE)
    ^~~~~~
R/arrow-info.R:135:5: style: [return_linter] Use implicit return behavior; explicit return() is not needed.
    return(FALSE)
    ^~~~~~
R/dplyr-arrange

or

 tests/testthat/test-dplyr-collapse.R:146:7: style: [commented_code_linter] Remove commented code.
  #   filter(dbl > 2) %>%
      ^~~~~~~~~~~~~~~~~~~

tests/testthat/test-dplyr-collapse.R:147:7: style: [commented_code_linter] Remove commented code.
  #   select(chr, int, lgl) %>%
      ^~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-dplyr-collapse.R:148:7: style: [commented_code_linter] Remove commented code.
  #   mutate(twice = int * 2L) %>%
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test-dplyr-collapse.R:149:7: style: [commented_code_linter] Remove commented code.
  #   group_by(lgl) %>%
      ^~~~~~~~~~~~~~~~~

tests/testthat/test-dplyr-collapse.R:150:7: style: [commented_code_linter] Remove commented code.
  #   summarize(total = sum(int, na.rm = TRUE)) %>%
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In addition: Warning message:

We should update lintr to the latest version and fix the linting failures.
We did temporarily pin here: #45524

Component(s)

R, Developer Tools

Activity

  1. self-assigned this
    on Feb 14, 2025
  2. jonkeane commented on Feb 14, 2025

    @jonkeane
    Member

    I'll try and take a look at this (though if someone else is super interested to grab it, feel free!)

  3. thisisnic commented on Feb 17, 2025

    @thisisnic
    Member

    I'm happy to grab this one - haven't made any PRs in a while and it looks like a good one to get back into if you haven't started already @jonkeane?

  4. jonkeane commented on Feb 17, 2025

    @jonkeane
    Member

    Sure, feel free. I hadn't started it yet. I've removed my assignment

  5. removed their assignment
    on Feb 17, 2025
  6. self-assigned this
    on Feb 17, 2025
  7. added a commit that references this issue on Feb 19, 2025
  8. added this to the 20.0.0 milestone on Feb 19, 2025
  9. thisisnic commented on Feb 19, 2025

    @thisisnic
    Member

    Issue resolved by pull request 45556
    #45556

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions