anyone know why lintr is marking the first string of my jupyter r kernels in red?

1.7k Views Asked by At

screen shot of lintr marking my first character in red

screen shot of another example

i just set up R to work with Jupyter notebooks in vscode but it is marking the first string of my kernels in red.

The message I get is:

Failed to run diagnostics: ! error in callr subprocess
Caused by error:
! Full file exclusions must be character vectors of length 1. items: 1 are not! lintr

if i uninstall languageserver package then it disappears but vscode asks me to reinstall it and then it comes back how do i get rid of this?

2

There are 2 best solutions below

0
On

Could you try to run the R code below:

lintr::use_lintr(type = "tidyverse")

see https://github.com/r-lib/lintr/blob/main/README.md#lintr-file-example for reference. I think it creates a .lintr file that defines a default behaviour for lintr within your project directory.So you might need to run the code above each time you have a new project

0
On

Try running the R code below to update the languageserver package to the latest development build:

    install.packages("languageserver", repos = c(
    reditorsupport = "https://reditorsupport.r-universe.dev",
    getOption("repos")
))

see https://github.com/REditorSupport/vscode-R/issues/343 for reference. It seems like this error was fixed via REditorSupport/languageserver#610.

I had this same error and this worked for me.