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

Address undesirable_function_linter() lints #1761

Merged
merged 5 commits into from
Nov 9, 2022
Merged

Conversation

IndrajeetPatil
Copy link
Collaborator

No description provided.

R/utils.R Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #1761 (7ed0535) into main (04eecd4) will increase coverage by 0.00%.
The diff coverage is 87.50%.

❗ Current head 7ed0535 differs from pull request most recent head 2def1c6. Consider uploading reports for the commit 2def1c6 to get more accurate results

@@           Coverage Diff           @@
##             main    #1761   +/-   ##
=======================================
  Coverage   98.87%   98.87%           
=======================================
  Files         109      109           
  Lines        4621     4624    +3     
=======================================
+ Hits         4569     4572    +3     
  Misses         52       52           
Impacted Files Coverage Δ
R/utils.R 98.29% <75.00%> (+0.02%) ⬆️
R/lint.R 96.78% <100.00%> (+<0.01%) ⬆️
R/with.R 93.05% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@AshesITR
Copy link
Collaborator

AshesITR commented Nov 4, 2022

Just so I understand, this is to enable undesirable_function_linter() in .lintr_new?

If so, why not add it immediately?
IINM, it's currently disabled.

@IndrajeetPatil
Copy link
Collaborator Author

@AshesITR I was going to do this later in one go, but we can do this PR-by-PR.

I have updated .lintr_new.

@AshesITR
Copy link
Collaborator

AshesITR commented Nov 4, 2022

What we did in the last cleanup was

  1. add all linters to .lintr_new to ensure no new "dirty" code is produced and then
  2. PR-by-PR fix one type of lints and add the fixed linter to .lintr.

@IndrajeetPatil
Copy link
Collaborator Author

Yeah, that's what I've also been doing, but wasn't sure if we want to continue to let .lintr_new diverge from .lintr.

At any rate, I have updated .lintr_new.

@AshesITR
Copy link
Collaborator

AshesITR commented Nov 4, 2022

Let's file an issue for this cleanup and discuss first what .lintr_new, and eventually .lintr, should look like in the end.
Once we've settled on that, I think we can implement the necessary PRs with more confidence.

For this discussion, the current tally of lint_package(linters = linters_with_tags(NULL)) is probably a good starting point.

cc @MichaelChirico @jimhester

@IndrajeetPatil
Copy link
Collaborator Author

@AshesITR We need to clean these lints regardless of what we decide here. So instead of keeping this PR blocked, I'd suggest that I revert the change to .lintr_new, and we can address how it should be updated in a different PR.

The current PR will then be solely about address undesirable_function_linter() lints. WDYT?

@AshesITR
Copy link
Collaborator

AshesITR commented Nov 8, 2022

SGTM. Should also revert the nolint comments then.

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.

Waiting for reverts to .lintr_new and the # nolint: undesirable_function_linter. comments.
The rest is ready to approve.

@IndrajeetPatil
Copy link
Collaborator Author

Waiting for reverts to .lintr_new and the # nolint: undesirable_function_linter. comments.

Done!

@IndrajeetPatil IndrajeetPatil merged commit f486464 into main Nov 9, 2022
@IndrajeetPatil IndrajeetPatil deleted the lint_cleanup_nov_22 branch November 9, 2022 19:08
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.

3 participants