Skip to content

Lintr errors whilst trying to lint staged / indexed files in git #1436

Closed

Description

@gowerc

Description of issue

It looks like the lintr is trying to execute on staged/indexed files in git but just errors when trying to do so. Worse still is that these errors end up littering the Problems pane and are never cleared up. Only solution seems to be to restart vscode

Gif of issue

2023-10-11 11 42 06

Versions

MacOS - 13.3.1 (22E261)
REditorSupport.r - 2.8.2
R - 4.3.1
lintr - 3.1.0
language server - 0.3.16

Settings file

	"files.associations": {
		"*.rmd": "rmd"
	},
    "r.alwaysUseActiveTerminal": true,
    "r.liveShare.defaults.shareWorkspace": false,
    "r.lsp.promptToInstall": false,
    "r.session.objectTimeout": 10,
    "r.session.useWebServer": false,
    "r.sessionWatcher": true,

Activity

  1. dshemetov commented on Jun 29, 2024

    @dshemetov

    Having the same issue.

  2. DarianGill commented on Apr 5, 2025

    @DarianGill

    Same here

  3. ThomasSoeiro commented on Sep 27, 2026

    @ThomasSoeiro
    Collaborator
  4. eitsupi commented on Sep 27, 2026

    @eitsupi
    Member

    My understanding is that this refers to a problem where false positives occur because things that aren't actual complete R files are being targeted by linting. It doesn't seem to be related to the fix for the languageserver.

  5. renkun-ken commented on Oct 6, 2026

    @renkun-ken
    Member

    This was addressed in #1697, which is merged into main and included in 3.0.0. The language client excludes Git-indexed documents from its document selectors and clears diagnostics for unsupported schemes such as git://, as well as files that no longer exist. See the current diagnostic middleware.

    The suggested languageserver #706 concerns reading .lintr settings and addresses a different problem.

    Closing as completed. If Git-indexed diagnostics still appear with 3.0.1 or a current development build, please provide a minimal reproduction and the installed languageserver / lintr versions so we can investigate the remaining case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions