[ci] [R-package] upgrade to lintr v3.0 (fixes #5228) #5294
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #5228.
Reverts #5290.
{lintr}
v3.0.0 was released to CRAN a few days ago (https://cran.r-project.org/web/packages/lintr/index.html). This PR proposes updates to thelint
CI job to make LightGBM's CI compatible with that new version.Changes in this PR
Converts linters to function calls instead of function references (see #5228 (comment) for background).
Replaces some linters to resolve the following warnings.
Makes minor changes to resolve the following linting errors.
Notes for Reviewers
There are some NEW linters available in
{lintr}
v3.0.0, and maybe this project should consider them. But I decided not to investigate that here, and limit this PR's scope to "get LightGBM's linting job working with the latest{lintr}
".I'd also like to say a special thanks to @MichaelChirico for giving us so much advance warning of this new release via Twitter, and for all the help on #5228 and related conversations here and in https://github.com/r-lib/lintr.