-
-
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
Warnings in Ruby verbose mode #3457
Comments
Guess we'll have to look into this. Btw, the current RuboCop version is 0.42. :-) |
That's actually not a verbose mode, but "warnings" mode. Yes, RuboCop is supposed to supersede it. |
Derp, I just copied the version from the issue template. I'm using 0.42/2.3.0. The Ruby manpage describes it as verbose mode, not warnings mode:
|
The reported warnings are all gone. #3698 cleared them up. When I run Rubocop on itself (
and an unavoidable warning from a comment about magic comments in
Unless we institute some kind of "no new warnings" check, there's nothing to do for this issue. |
I'd be fine with just tweaking or removing this comment. If it emits warnings for all users then it is probably not worth it. |
I've implemented a "No new warnings" check for a few open source projects I've contributed to that could be helpful here. For example, see https://github.com/backus/mutest/blob/c4765390103b514b066c2a1e59ee81c98bafe3d2/spec/spec_helper.rb#L66-L69 https://github.com/backus/mutest/blob/c4765390103b514b066c2a1e59ee81c98bafe3d2/spec/support/warning.rb. Basically it compares ruby warnings against warnings listed in a config file and then asserts at the end of the test suite that there weren't any new warnings. It is a bit of a hack but it works very nicely |
The documentation for `MagicComment` produced: ``` lib/rubocop/magic_comment.rb:124: warning: `frozen_string_literal' is ignored after any tokens ```
The documentation for `MagicComment` produced: ``` lib/rubocop/magic_comment.rb:124: warning: `frozen_string_literal' is ignored after any tokens ```
I suspect you've already dealt with this issue, but I couldn't find a previous one. Sorry if this is a dupe!
Rubocop outputs lots of warnings when run with
RUBYOPT="-w"
:...etc, etc.
Many think that Ruby libraries should not output any warnings when Ruby is running in verbose mode. What say you? Will you accept PRs to fix some of these warnings?
I discovered this while trying to remove some warnings from
raven-ruby
- we userequire 'rubocop/rake_task'
, so rubocop's warnings were cluttering up the warnings from our own library.Also, as a side note, how do you see Rubocop interacting with verbose mode? Does Rubocop completely supercede verbose mode, or should they be able to work together?
RuboCop version
The text was updated successfully, but these errors were encountered: