-
Notifications
You must be signed in to change notification settings - Fork 187
fix detection of non-syntactic names in object_overwrite_linter()
#2347
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2347 +/- ##
=======================================
Coverage 99.41% 99.41%
=======================================
Files 124 124
Lines 5640 5642 +2
=======================================
+ Hits 5607 5609 +2
Misses 33 33 ☔ View full report in Codecov by Sentry. |
@@ -76,7 +76,7 @@ object_overwrite_linter <- function( | |||
# test that the symbol doesn't match an argument name in the function | |||
# NB: data.table := has parse token LEFT_ASSIGN as well | |||
xpath_assignments <- glue(" | |||
//SYMBOL[ | |||
(//SYMBOL | //STR_CONST)[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(idle musing, nothing actionable ATM)
I wonder about the performance of //STR_CONST
vs. //LEFT_ASSIGN
. Actually per the original issue about avoiding //expr
, they appear at roughly the same frequency, so probably it's not much difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, from what I remember, only //expr
stood out to be exceptionally bad cost-wise.
I reproduce the |
fixes #2346