Skip to content

[ci] [R-package] use {lintr} 3.1#5997

Merged
jameslamb merged 3 commits intomasterfrom
r/new-linters
Aug 4, 2023
Merged

[ci] [R-package] use {lintr} 3.1#5997
jameslamb merged 3 commits intomasterfrom
r/new-linters

Conversation

@jameslamb
Copy link
Collaborator

Upgrades the R code linting to use {lintr} v3.1, which was just released. I added in most of the new linters in that version, and did some of the renaming of existing linters that came with that release.

For full release notes, see https://github.com/r-lib/lintr/releases/tag/v3.1.0.

Also fixes the 1 new linting issue this caught.

R-package/R/lgb.interprete.R:75:13: warning: [unnecessary_lambda] Pass matrix directly as a symbol to lapply() instead of wrapping it in an unnecessary anonymous function. For example, prefer lapply(DF, sum) to lapply(DF, function(x) sum(x)).
    , FUN = function(x) matrix(x, ncol = num_class, byrow = TRUE)
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@jameslamb jameslamb requested review from guolinke and shiyu1994 July 21, 2023 03:33
@jameslamb jameslamb changed the title WIP: [ci] [R-package] use {lintr} 3.1 [ci] [R-package] use {lintr} 3.1 Jul 21, 2023
@jameslamb jameslamb marked this pull request as ready for review July 21, 2023 15:09
@jameslamb jameslamb merged commit 20975ba into master Aug 4, 2023
@jameslamb jameslamb deleted the r/new-linters branch August 4, 2023 19:02
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2023

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants