Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclusions in .lintr not working #282

Closed
renkun-ken opened this issue Jun 23, 2020 · 3 comments · Fixed by #284
Closed

Exclusions in .lintr not working #282

renkun-ken opened this issue Jun 23, 2020 · 3 comments · Fixed by #284
Labels

Comments

@renkun-ken
Copy link
Member

renkun-ken commented Jun 23, 2020

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.

@renkun-ken renkun-ken added the bug label Jun 23, 2020
@randy3k
Copy link
Member

randy3k commented Jun 23, 2020

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.

@renkun-ken
Copy link
Member Author

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

@franzbischoff
Copy link

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
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants