-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Cannot lint Capfile
with rubocop
#4242
Comments
I suspect this is related to #3997, specifically to c2a9848. Looks like |
I can confirm that placing But I'd never expect rubocop to ignore a file I throw at it explicitly. Only exception might be if I have excluded it by my own in my config, and this is what If I pass a directory (or run it without arguments), I think a user expects it to only grab ruby files (typically identified by extension, I'd think everything else is over engineering). Additionally it should respect the |
Yeah, this definitely is a bug. I would not expect the current behaviour either. On the other hand this would be an issue with globbing as then you'd likely get some files that are non-ruby. Probably there's no easy way to fix it for all possible use cases as we can really know if you'd like to check a file that doesn't look like a Ruby file. Keep in mind that from the perspective of RuboCop stuff like globbing are invisible - it just gets a list of filenames from the shell. @andreaswachowski is right that we definitely need to update |
@bbatsov I added a new issue #4245 for this. Regarding to globbing: Yes, globbing on command line is invisible to rubocop. But when I glob on the command line, then I have to make sure that I pass correct files. That is not the responsibility of rubocop to filter my bad glob, or at least it should be optional behind a flag. |
Rubocop seems to ignore my "Capfile":
It says "0 files inspeced", so it didn't even take a look.
Afaik it is included by default anyway, so shouldn't I be allowed to lint it?
The text was updated successfully, but these errors were encountered: