You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. Not sure if this is worth reporting since this is fairly minor but
if you feel that this is not important, feel free to close it any moment
in time.
I ran rubocop against a codebase of medium size and it gave some
warnings/errors. One warning was a bit confusing though:
bioroebe/lib/bioroebe/is_on_roebe?.rb:1:1: C: Use snake_case for source file names.
class Bioroebe # require 'bioroebe/is_on_roebe?.rb'
So rubocop says that one should use snake_case for source
file names. Fair enough.
Now, the name of this file is:
is_on_roebe?.rb
And technically, I would think that this is actually snake_case
already, since we had no upcased characters in it. I assume that
rubocop complains about the ? actually. The "?" token has no
uppercased or lowercased variant. One could reason that it already
is uppercased as-is, but then what would be its lowercased
variant - a tiny "?" perhaps? :)
Rubocop may or may not issue a warning for the use of ? in a
filename or not, that is fine. But I think the warning message
itself should be slightly different in this case, not only just
for characters such as "?" but also for all characters that have
no distinction between upcase and lowercase variants. For
alphabetical characters, this is all usually doable, e. g. "r"
versus uppercase "R". For other characters, this is not always
possible - I am thinking of some unicode names too. Rubocop
accepts "_" in filenames too right now.
At any rate - my suggestion would be to pick either one of the
following:
Ignore tokens that can not be uppercased/lowercased altogether
when issuing a warning about filenames.
Use a different warning for filenames like that. This here may
be slightly better altogether.
The warning could then be:
"Use standard alphabetical characters for file names.", for
instance. And "_" will continue to be ignored either way since
it is so common.
Thanks!
The text was updated successfully, but these errors were encountered:
Hello. Not sure if this is worth reporting since this is fairly minor but
if you feel that this is not important, feel free to close it any moment
in time.
I ran rubocop against a codebase of medium size and it gave some
warnings/errors. One warning was a bit confusing though:
So rubocop says that one should use snake_case for source
file names. Fair enough.
Now, the name of this file is:
And technically, I would think that this is actually snake_case
already, since we had no upcased characters in it. I assume that
rubocop complains about the ? actually. The "?" token has no
uppercased or lowercased variant. One could reason that it already
is uppercased as-is, but then what would be its lowercased
variant - a tiny "?" perhaps? :)
Rubocop may or may not issue a warning for the use of ? in a
filename or not, that is fine. But I think the warning message
itself should be slightly different in this case, not only just
for characters such as "?" but also for all characters that have
no distinction between upcase and lowercase variants. For
alphabetical characters, this is all usually doable, e. g. "r"
versus uppercase "R". For other characters, this is not always
possible - I am thinking of some unicode names too. Rubocop
accepts "_" in filenames too right now.
At any rate - my suggestion would be to pick either one of the
following:
when issuing a warning about filenames.
be slightly better altogether.
The warning could then be:
"Use standard alphabetical characters for file names.", for
instance. And "_" will continue to be ignored either way since
it is so common.
Thanks!
The text was updated successfully, but these errors were encountered: