Skip to content

Languageserver does not respect .lintr file #2985

@Yousa-Mirage

Description

@Yousa-Mirage

I am using lintr in VSCode on my Arch Linux WSL. I have a ~/.lintr file in the home path like this and it can be read successfully:

linters: linters_with_defaults(
  line_length_linter = line_length_linter(120L),
  assignment_linter = NULL,
  quotes_linter = NULL
  )

r$> read.dcf("~/.lintr")
     linters                                                                                                                     
[1,] "linters_with_defaults(\nline_length_linter = line_length_linter(120L),\nassignment_linter = NULL,\nquotes_linter = NULL\n)"

But it doesn't work. There are still warnings in vscode workplace.

Image

But if I run lintr::lint("test_lint.r") directly, there are no lint warnings, so maybe my .lintr has been found and loaded correctly. Maybe there are some stupid errors I have made but I can't find.

r$> lintr::lint("test_lint.r")
ℹ No lints found.

The lintr is newest: r$> packageVersion("lintr") [1] ‘3.3.0.9000’ and I am using radian. My VSCode is on Windows and connected to WSL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions