Skip to content

[R-package] remove unreachable code#6180

Merged
jameslamb merged 1 commit intomasterfrom
r/unreachable-code
Nov 8, 2023
Merged

[R-package] remove unreachable code#6180
jameslamb merged 1 commit intomasterfrom
r/unreachable-code

Conversation

@jameslamb
Copy link
Collaborator

@jameslamb jameslamb commented Nov 8, 2023

A new version of {lintr} was released today (CRAN link) and it caught an unreachable line of code in the R package!

R-package/R/lgb.Booster.R:1465:5: warning: [unreachable_code] Code and comments coming after a return() or stop() should be removed.
stop("lgb.get.eval.result: wrong eval name")

This PR fixes that.

Notes

Not sure exactly which {lintr} change resulted in this being caught, but I think it's r-lib/lintr#2129. Thanks @MEO265 and @MichaelChirico!

@MichaelChirico
Copy link

thanks for actively culling lints with {lintr} and keeping your coffee quality top notch!

@jameslamb jameslamb merged commit 5e90255 into master Nov 8, 2023
@jameslamb jameslamb deleted the r/unreachable-code branch November 8, 2023 19:22
@jameslamb jameslamb removed the blocking label Nov 8, 2023
@github-actions
Copy link
Contributor

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 13, 2024
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.

3 participants