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

Remove custom linting logic from addins #2526

Merged
merged 2 commits into from
Mar 23, 2024
Merged

Remove custom linting logic from addins #2526

merged 2 commits into from
Mar 23, 2024

Conversation

MichaelChirico
Copy link
Collaborator

Closes #2525

Probably I don't understand how add-ins are invoked, but it seems this approach should work & is much simpler.

cc @HaHeho -- are you able to test if this works?

@HaHeho
Copy link

HaHeho commented Mar 12, 2024

cc @HaHeho -- are you able to test if this works?

I would like to try. How can I install this version from within R Studio?

@MichaelChirico
Copy link
Collaborator Author

maybe remotes::install_github("r-lib/lintr@addin-config")? and be sure to close/restart all RStudio windows...

Copy link
Collaborator

@AshesITR AshesITR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please wait for a positive user test just to be sure, though.

@HaHeho
Copy link

HaHeho commented Mar 22, 2024

Apologies for the delay. I have successfully tested the fix (at least with my specific configuration).

Before update:

> packageVersion("lintr")
[1] ‘3.1.1> lintr::lint("file") # with a ".lintr.R"
# WORKS

> lintr:::addin_lint() # with a ".lintr.R"
Error in read.dcf(config_file, all = TRUE) : Invalid DCF format.
Regular lines must have a tag.
Offending lines start with: ...

After remotes::install_github("r-lib/lintr@addin-config") and a complete restart of RStudio:

> packageVersion("lintr")
[1] ‘3.1.1.9000> lintr::lint("file") # with a ".lintr.R"
# WORKS

> lintr:::addin_lint() # with a ".lintr.R"
# WORKS

With the new version, I receive a few more linter warnings and Trying to remove ‘extraction_operator_linter’, which is not in "defaults". (in my specific config). I assume this is intended and related to other linter additions with this version, as it is consistent from both the console and adding calls.

@MichaelChirico
Copy link
Collaborator Author

Yep, that's intended: 32cb18c

@IndrajeetPatil IndrajeetPatil merged commit d946143 into main Mar 23, 2024
20 checks passed
@IndrajeetPatil IndrajeetPatil deleted the addin-config branch March 23, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error from .lintr.R configuration when invoked via R Studio addin (but not console)
4 participants