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

Refactor quotes_linter() to avoid using with() #1995

Closed
AshesITR opened this issue Jul 1, 2023 · 3 comments · Fixed by #2175
Closed

Refactor quotes_linter() to avoid using with() #1995

AshesITR opened this issue Jul 1, 2023 · 3 comments · Fixed by #2175
Assignees
Labels
internals Issues related to inner workings of lintr, i.e., not user-visible
Milestone

Comments

@AshesITR
Copy link
Collaborator

AshesITR commented Jul 1, 2023

Found here: #1993 (review)

codetools has a hard time correctly analyzing the function, causing multiple false positive lints that need to be disabled.
If we refactor quotes_linter() to not use with(), codetools should have such a hard time analyzing it.

@AshesITR AshesITR added the internals Issues related to inner workings of lintr, i.e., not user-visible label Jul 1, 2023
@MichaelChirico
Copy link
Collaborator

I would be against making the code harder to read on account of a false positive lint. # nolint is appropriate for cases like this.

If the proposed refactor would improve readability, then do proceed.

@MichaelChirico
Copy link
Collaborator

would you mind filing the nested with bug on codetools issue tracker?

there's a proposal to work on codetools at the upcoming R sprint so it'd be good to have known issues logged if that gets picked up:

r-devel/r-project-sprint-2023#11

@AshesITR
Copy link
Collaborator Author

AshesITR commented Jul 3, 2023

There already is one, cf. https://gitlab.com/luke-tierney/codetools/-/issues/6, reported 7 months ago.
Not sure why we missed the nolint comments.

@MichaelChirico MichaelChirico added this to the 3.1.1 milestone Aug 22, 2023
@MichaelChirico MichaelChirico modified the milestones: 3.1.1, 3.1.2 Sep 7, 2023
@AshesITR AshesITR modified the milestones: 3.1.2, 3.1.1 Sep 15, 2023
@AshesITR AshesITR self-assigned this Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internals Issues related to inner workings of lintr, i.e., not user-visible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants