enable return_linter - #725
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
dragosmg
left a comment
There was a problem hiding this comment.
Apologies for the repeated comment
| if (missing(arg_call)) { | ||
| ## args not defined can quietly return empty expressions. | ||
| return(quote(expr = )) | ||
| quote(expr = ) |
There was a problem hiding this comment.
These are early returns, I'd keep the return() call here. Do they trigger the linter?
There was a problem hiding this comment.
@dragosmg yeah all these that you've commented on trigger the linter, ive just changing this one for now, should i add nolint or do we not want to turn this lintr on as theres quite a lot?
There was a problem hiding this comment.
first thought would be to go with nolint where needed. I'll have a deeper look.
| if (is.name(x)) { | ||
| if (identical(as_label(x), "<empty>")) { | ||
| return(NULL) | ||
| NULL |
There was a problem hiding this comment.
These are early returns, I'd keep the return() call here. Do they trigger the linter?
| } | ||
| } else if (is.character(x)) { | ||
| return(as_length_one_quo.character(x)) | ||
| as_length_one_quo.character(x) |
There was a problem hiding this comment.
These are early returns, I'd keep the return() call here. Do they trigger the linter?
| is_valid_quo_call(x) || is_valid_span_structure_call(x) | ||
| ) { | ||
| return(eval_tidy(x)) | ||
| eval_tidy(x) |
There was a problem hiding this comment.
These are early returns, I'd keep the return() call here. Do they trigger the linter?
| NULL | ||
| } else { | ||
| return(quo(!!x)) | ||
| quo(!!x) |
There was a problem hiding this comment.
These are early returns, I'd keep the return() call here. Do they trigger the linter?
| } | ||
| } else if (is.character(x)) { | ||
| return(as_length_one_quo.character(x)) | ||
| as_length_one_quo.character(x) |
There was a problem hiding this comment.
These are early returns, I'd keep the return() call here. Do they trigger the linter?
| quo(!!x) | ||
| } else if (is_valid_quo_call(x)) { | ||
| return(eval_tidy(x)) | ||
| eval_tidy(x) |
There was a problem hiding this comment.
These are early returns, I'd keep the return() call here. Do they trigger the linter?
| NULL | ||
| } else { | ||
| return(quo(!!x)) | ||
| quo(!!x) |
There was a problem hiding this comment.
These are early returns, I'd keep the return() call here. Do they trigger the linter?
| if (is.name(x)) { | ||
| if (identical(as_label(x), "<empty>")) { | ||
| return(NULL) | ||
| NULL |
There was a problem hiding this comment.
These are early returns, I'd keep the return() call here. Do they trigger the linter?
| } | ||
|
|
||
| return(arg_val) | ||
| arg_val |
There was a problem hiding this comment.
These are early returns, I'd keep the return() call here. Do they trigger the linter?
🦺 Coverage summary🟢 Merging PR #725 ( ♻️ Comment updated with the latest results. Created on 2026-07-28 with covr2gh v0.0.0.9041. |
resolves #726