Skip to content

Exclusions in .lintr not working #282

Closed

Description

@renkun-ken

From REditorSupport/vscode-R#354.

The exclusions in .lintr is not working:

.lintr:

exclusions: list("test1.R")

test1.R:

1+1

The file is still diagnosed, implying that the exclusions is not respected.

This is caused by that we lint a temp file with potential unsaved edits rather the original file in the workspace. The exclusions do not apply to the temp file path.

Activity

  1. randy3k commented on Jun 23, 2020

    @randy3k
    Member

    I haven’t tested it. In normal circumstances, would linter::lint(file) runs if the file is excluded? I asked it because we run lint explicitly.

  2. renkun-ken commented on Jun 23, 2020

    @renkun-ken
    MemberAuthor

    lintr::lint(file) omits no result if the file is excluded in .lintr.

  3. franzbischoff commented on Jan 17, 2021

    @franzbischoff

    Suggestion, while the bug is not fixed:
    write this inside the file

    # nolint start
    your code
    # nolint end
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