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

Recognize and honor .lintr file #28

Closed
hafen opened this issue Oct 9, 2017 · 5 comments
Closed

Recognize and honor .lintr file #28

hafen opened this issue Oct 9, 2017 · 5 comments

Comments

@hafen
Copy link

hafen commented Oct 9, 2017

For folders that use a .lintr file, it would be nice is this extension would honor those settings.

@Ikuyadeu Ikuyadeu self-assigned this Oct 10, 2017
@Ikuyadeu
Copy link
Member

@hafen I didn't know that, and I'll try.
Thank you for your good information!

@hafen
Copy link
Author

hafen commented Oct 11, 2017

👍 Thanks for looking into it and making this extension.

@Ikuyadeu
Copy link
Member

Ikuyadeu commented Nov 11, 2017

@hafen , new this extension 0.5.0 supported folder's lintr by settings r.lintr.isPackages to true.
However, supporting .lintr is still on TODO yet.
Please change r.lintr.linter in setting.json until support.
Such as

 "r.lintr.linters": "with_defaults(line_length_linter(100))"

@smped
Copy link

smped commented Jun 28, 2021

I currently have this issue on Ubuntu 18.04 using lintr 2.0.1 and R4.0.3. On a separate Windows machine with an WSL installation running Ubuntu 20.04 and R4.1.x the situation is identical.

cat ~/.vscode/extensions/ikuyadeu.r-2.0.0/R/.lintr 
linters: with_defaults(
  line_length_linter(120),
  cyclocomp_linter = NULL,
  object_name_linter = NULL,
  object_usage_linter = NULL)

I'm getting problems detected such as:

Lines should not be more than 80 characters
Variable and function name style should be snake_case

Changing the values in the .lintr file makes no difference. Linting manually using lintr::lint("path/to/file") behaves as expected.

@renkun-ken
Copy link
Member

@steveped You should edit ~/.lintr.

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

No branches or pull requests

4 participants