-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
False Style/RedundantSelf
on static method
#12512
Comments
If At least that's what's happening in: https://github.com/Homebrew/brew/blob/9f65f120f3fef7263a646d3f690098751c02e078/Library/Homebrew/formula_creator.rb#L50-L51 |
You're right. The I still feel that |
There is no way rubocop can help with this. |
@fatkodima can |
No, |
@fatkodima I am not an expert in Ruby static analysis. Does |
It can read, but it does not do that most of the time. And this will be hard (read "impossible"), because you can define methods in parent classes, inside included modules, via metaprogramming. |
@fatkodima but I guess there is no way |
Actual behavior
In this GitHub job https://github.com/Homebrew/brew/actions/runs/7091523800/job/19300839843?pr=16238#step:6:15
self.name_for_url
is the static method in the same class. Removingself
from it results in the following error.Expected behavior
Let static method calls pass. Or provide sufficient explanation why static method calls are bad.
Steps to reproduce the problem
This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler.If you see extension cop versions (e.g.
rubocop-performance
,rubocop-rspec
, and others)output by
rubocop -V
, include them as well. Here's an example:The text was updated successfully, but these errors were encountered: