Use lint text if supported#284
Conversation
|
LGTM except you might need to |
|
Since r-lib/lintr#503 is merged, we could wait for the latest lintr (probably 3.0.0) to be released, then we could import |
|
@randy3k Since we have support for both old lintr (current release) and latest lintr with |
randy3k
left a comment
There was a problem hiding this comment.
I am a bit hesitated to merge it. With that say, I guess it is an acceptable solution for now, just need to put a note here to remind ourselves in the future.
|
The tests only work with latest lintr rather than the current CRAN release. I guess we should postpone this PR until lintr 3.0.0 is released and then we could directly import lintr 3.0.0 and do not have to detect Or after this languageserver release, we could put back |
|
I guess we could merge this PR into master now. The development version of |
R/diagnostics.R
Outdated
| # In the upcoming lintr 3.0.0, lint(text=) is supported so that | ||
| # we could supply both filename and text and the text will be | ||
| # regarded as the content of the file. | ||
| lint_text_support <- "text" %in% names(formals(lintr::lint)) |
There was a problem hiding this comment.
Do we still need this for the version of lintr specified in DESCRIPTION?
There was a problem hiding this comment.
Now we could safely assume lintr(text=). I'll remove those checking.
|
LGTM |
|
I just realized that there is no roadmap for the release of new version of |
Close #80
Close #235
Close #238
Close #282
r-lib/lintr#503 adds a
text=argument tolintr::lintto make it easier for code editors to lint a text as if it is from a filename so that lint config is kept effective.