vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

How to customize linter behavior from vscode settings?

Open JohnMoutafis opened this issue 9 years ago • 11 comments

I want to use lintr method of customizing linter behavior. Tried this: "r.lintr.linters": "with_defaults(line_length_linter(100))" with no effect.

Which is the correct way to configure linting in vscode (without .lintr file)?

JohnMoutafis avatar Nov 22 '17 16:11 JohnMoutafis

@JohnMoutafis Thank you for using! This problem was occurred in previous version vscode-r and Windows. I think this problem was fixed in latest version. However I don't have windows environment.

Could you tell me version for your OS, VS Code and vscode-r?

Ikuyadeu avatar Nov 23 '17 07:11 Ikuyadeu

@Ikuyadeu Thanks for the reply.

I am using a Linux Mint 18.1. Is the latest version the 0.5.0 which I see on vscode extensions tab? The way I was trying is correct but it doesn't work?

JohnMoutafis avatar Nov 23 '17 08:11 JohnMoutafis

@JohnMoutafis Thank you for reply too. This version is correct. I think this extension can't reload setting file by self. Could you restart VS Code?

Ikuyadeu avatar Nov 23 '17 10:11 Ikuyadeu

@Ikuyadeu That seems to work but not for all the linters listed in the lintr repository. Probably a more thorough check must be done and some documentation on the matter?

JohnMoutafis avatar Nov 23 '17 18:11 JohnMoutafis

@JohnMoutafis Thank you for detail infomation! OK, I'll try check. Could you tell me which linters are not working?

Ikuyadeu avatar Nov 24 '17 00:11 Ikuyadeu

@Ikuyadeu I tried with single_quotes_linter and it kept notating single quotes as errors.

On the other hand, infix_spaces_linter works just by adding it in

JohnMoutafis avatar Nov 24 '17 07:11 JohnMoutafis

@JohnMoutafis Sorry my reply is late. I checked this, however couldn't understand causes. In the next week, I'll add not working linter list.

Ikuyadeu avatar Dec 11 '17 04:12 Ikuyadeu

Hi, I would like to ask if the not working linter list is added or not?

tim-sheung avatar Feb 20 '18 16:02 tim-sheung

@raindicky Sorry, this work is late.

Ikuyadeu avatar Mar 04 '18 06:03 Ikuyadeu

@Ikuyadeu So will it be a supporting feature in the near feature? I find the package is very useful but I'm not quite familiar with how to turn off some undesirable linter function. Is there any guide to do so in setting? Thx for your effort :)

tim-sheung avatar Mar 04 '18 16:03 tim-sheung

Customised linting is now supported via the language server using .lintr files and version 2.0.0 of the lintr package. Details at the lintr package README.

andycraig avatar Oct 24 '19 09:10 andycraig