Rakefile
Use warn
instead of $stderr.puts
to allow such output to be disabled. Open
Open
$stderr.puts 'Run `bundle install` to install missing gems'
- Read upRead up
- Exclude checks
This cop identifies places where $stderr.puts
can be replaced by
warn
. The latter has the advantage of easily being disabled by,
e.g. the -W0 interpreter flag, or setting $VERBOSE to nil.
Example:
# bad
$stderr.puts('hello')
# good
warn('hello')
%w
-literals should be delimited by [
and ]
. Open
Open
gem.authors = %w(teonimesic ggouzi)
- Read upRead up
- Exclude checks
This cop enforces the consistent usage of %
-literal delimiters.
Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.
Example:
# Style/PercentLiteralDelimiters:
# PreferredDelimiters:
# default: '[]'
# '%i': '()'
# good
%w[alpha beta] + %i(gamma delta)
# bad
%W(alpha #{beta})
# bad
%I(alpha beta)
Unnecessary utf-8 encoding comment. Open
Open
# encoding: utf-8
- Exclude checks
Use warn
instead of $stderr.puts
to allow such output to be disabled. Open
Open
$stderr.puts e.message
- Read upRead up
- Exclude checks
This cop identifies places where $stderr.puts
can be replaced by
warn
. The latter has the advantage of easily being disabled by,
e.g. the -W0 interpreter flag, or setting $VERBOSE to nil.
Example:
# bad
$stderr.puts('hello')
# good
warn('hello')