You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In languageserver, we have to pass the file content to lintr::lint() (since the file is often being edited but not saved, and we do provide live diagnostics on user input) but also want it to behave as if the content is from a filename so that the following cases could work:
One bad solution is to write a temp file inside the user workspace (e.g. original file test.R and we write a temp test.Rtmp) but Language Server Protocol seems to discourage any change in user workspace directly rather than via LSP communication.
Therefore, I'm wondering if we could add a text argument so that we could use
In languageserver, we have to pass the file content to
lintr::lint()
(since the file is often being edited but not saved, and we do provide live diagnostics on user input) but also want it to behave as if the content is from a filename so that the following cases could work:linter_file
is respected (.lintr defaults are not respected REditorSupport/languageserver#235)object_usage_linter
detects its package (Packages not loaded prior to linting with coc-r-lsp REditorSupport/languageserver#238).lintr
not working (Exclusions in .lintr not working REditorSupport/languageserver#282)One bad solution is to write a temp file inside the user workspace (e.g. original file
test.R
and we write a temptest.Rtmp
) but Language Server Protocol seems to discourage any change in user workspace directly rather than via LSP communication.Therefore, I'm wondering if we could add a
text
argument so that we could useby supplying both
filename
andtext
:so that both are respected and
lint
wouldn't have to read the file again iftext
is supplied.The text was updated successfully, but these errors were encountered: