REditorSupport / REditorSupport/vscode-R

Support for experimental https://lintr.r-lib.org/reference/read_settings.html#details

Open
#1,632 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

Describe the bug

vscode-R doesn't support the experimental lintr.R configuration file.

Only the DCF .lintr file is supported

To Reproduce

Create a lintr.R file:

linters <- linters_with_defaults(
    assignment_linter(operator = c("<-", "<<-", "%<>%")), 
    return_linter(
        return_style = c("implicit", "explicit"),
        allow_implicit_else = FALSE
    ),
    pipe_consistency_linter(pipe = c("auto")),
    line_length_linter = NULL,
    commented_code_linter = NULL)
encoding <- "UTF-8"

Write a R script with a very long line.

VS Code will complain that the line exceeds 80 characters.

Open a terminal and run lintr::lint("code.R").

No lints will be found.

Rename .lintr.R into .lintr and substitute the <- with :.

Press CTRL+P and then Reload Windows.

VSCode won't complain about too long lines anymore.

Environment (please complete the following information):

  • OS: Windows
  • VSCode Version:

Version: 1.102.2 (user setup)
Commit: c306e94f98122556ca081f527b466015e1bc37b0
Date: 2025-07-22T12:15:48.520Z
Electron: 35.6.0
ElectronBuildId: 11847422
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Windows_NT x64 10.0.26100

  • R Version
> sessionInfo()
R version 4.5.0 (2025-04-11 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)

Matrix products: default
  LAPACK version 3.12.1

locale:
[1] LC_COLLATE=English_United States.utf8
[2] LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8    

time zone: Europe/Rome
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] lintr_3.2.0.9000

loaded via a namespace (and not attached):
 [1] compiler_4.5.0     backports_1.5.0    lazyeval_0.2.2     cli_3.6.5
 [5] tools_4.5.0        rex_1.2.1          parallel_4.5.0     xmlparsedata_1.0.5
 [9] glue_1.8.0         rstudioapi_0.17.1  xml2_1.3.8         jsonlite_2.0.0
[13] rlang_1.1.6    
  • vscode-R version: 2.8.6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how vscode-R reads the supported .lintr settings and compare that behavior with lintr.R and lintr::read_settings. Reproduce the long-line example, then verify that a lintr.R configuration is honored without renaming it to .lintr.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.