Repository navigation
New unnecessary_placeholder_linter - #1656
Merged
Merged
Conversation
76 tasks done
Codecov Report
@@ Coverage Diff @@
## main #1656 +/- ##
=======================================
Coverage 98.49% 98.50%
=======================================
Files 101 102 +1
Lines 4456 4478 +22
=======================================
+ Hits 4389 4411 +22
Misses 67 67
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Contributor
|
Do you think we should also expand this linter to cover other operators from IINM, The WDYT? library(magrittr)
y <- 1
y %<>% sum(., 1) # lint
y
#> [1] 2
z <- 1
z %<>% sum(1)
z
#> [1] 2
# N.B. removing plots output manually to keep the reprex clean
1 %T>% plot %>% sum(1)
#> [1] 2
1 %T>% plot() %>% sum(1)
#> [1] 2
1 %T>% plot(.) %>% sum(1) # lint
#> [1] 2
mtcars %$% cor(wt, mpg)
#> [1] -0.8676594
mtcars %$% cor(.$wt, .$mpg) # lint
#> [1] -0.8676594
<sup>Created on 2022-10-10 with [reprex v2.0.2](https://reprex.tidyverse.org)</sup> |
Collaborator
Author
|
Agree we could add those, thanks for the suggestion! let's file follow-ups for those |
IndrajeetPatil
approved these changes
Oct 10, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #884
Originally named
MagrittrDotLinter(), I think the new name is an improvement (and paves the way for base's_to be included), but open to further refinement here.