-
Notifications
You must be signed in to change notification settings - Fork 186
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
Allow assignment generics on custom classes object name lintr #843
Conversation
Thanks for reporting this bug.
is in cc @MichaelChirico: |
I'm happy to try removing |
Hi @jonkeane, sorry for the late reply. |
Is there anything you need from me to get this finished? |
Just a few tiny things still need to be done:
|
Thanks for the follow up — I've done all three of those. I put the news at the end of the current list, but happy to move it elsewhere if that's perferable. |
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.
Thank you very much, almost ready to merge.
NEWS.md
Outdated
@@ -130,6 +130,7 @@ function calls. (#850, #851, @renkun-ken) | |||
* * `object_length_linter()` correctly detects generics and only counts the implementation class towards the length. | |||
This prevents false positive lints in the case of long generic names, e.g. | |||
`very_very_very_long_generic_name.short_class` no longer produces a lint (#871, @AshesITR) | |||
* Assignment generics on custom classes (#843, @jonkeane) |
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.
Maybe *
object_name_linter() now correctly detects assignment generics (#843, @jonkeane)
?
Done, and thank you, again! |
For assignment methods like
names<-.class_name
I'm seeing linting errors:This PR resolves this (by looking for
<-.
and replacing it with.
, instrip_names()
since the<-
are stripped from the generics before they are used in the matching regex in the object name lintr.Alternatively, I could try keeping
<-
in both the generic list and the function names that are being linted if we think that's a better approach.