freemail.gemspec
Add an empty line after magic comments. Open
Open
lib = File.expand_path('../lib', __FILE__)
- Read upRead up
- Exclude checks
Checks for a newline after the final magic comment.
Example:
# good
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end
# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end
%w
-literals should be delimited by [
and ]
. Open
Open
spec.summary = %w(A ruby implementation of the npm 'freemail' module)
- 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)
Within %w
/%W
, quotes and ',' are unnecessary and may be unwanted in the resulting strings. Open
Open
spec.summary = %w(A ruby implementation of the npm 'freemail' module)
- Read upRead up
- Exclude checks
This cop checks for quotes and commas in %w, e.g. %w('foo', "bar")
It is more likely that the additional characters are unintended (for example, mistranslating an array of literals to percent string notation) rather than meant to be part of the resulting strings.
Example:
# bad
%w('foo', "bar")
Example:
# good
%w(foo bar)
Use meaningful heredoc delimiters. Open
Open
END
- Read upRead up
- Exclude checks
This cop checks that your heredocs are using meaningful delimiters.
By default it disallows END
and EO*
, and can be configured through
blacklisting additional delimiters.
Example:
# good
<<-SQL
SELECT * FROM foo
SQL
# bad
<<-END
SELECT * FROM foo
END
# bad
<<-EOS
SELECT * FROM foo
EOS
Line is too long. [104/99] Open
Open
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
- Exclude checks
Unnecessary utf-8 encoding comment. Open
Open
# coding: utf-8
- Exclude checks