Showing 128 of 128 total issues
Ambiguous regexp literal. Parenthesize the method arguments if it's surely a regexp literal, or add a whitespace to the right of the /
if it should be a division. Open
When /^I attach the file "([^"]*)"$/ do |file|
- Read upRead up
- Exclude checks
This cop checks for ambiguous regexp literals in the first argument of a method invocation without parentheses.
Example:
# bad
# This is interpreted as a method invocation with a regexp literal,
# but it could possibly be `/` method invocations.
# (i.e. `do_something./(pattern)./(i)`)
do_something /pattern/i
Example:
# good
# With parentheses, there's no ambiguity.
do_something(/pattern/i)
Ambiguous regexp literal. Parenthesize the method arguments if it's surely a regexp literal, or add a whitespace to the right of the /
if it should be a division. Open
And /I should also be able to see their submission/ do
- Read upRead up
- Exclude checks
This cop checks for ambiguous regexp literals in the first argument of a method invocation without parentheses.
Example:
# bad
# This is interpreted as a method invocation with a regexp literal,
# but it could possibly be `/` method invocations.
# (i.e. `do_something./(pattern)./(i)`)
do_something /pattern/i
Example:
# good
# With parentheses, there's no ambiguity.
do_something(/pattern/i)
Using width with padding can sometimes make elements larger than you expect. Open
padding: 5px;
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.file-preview-frame {
- Exclude checks
Use of !important Open
background: transparent url('../img/loading.gif') no-repeat scroll center center content-box !important;
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.file-drop-zone {
- Exclude checks
Use of !important Open
border: 2px dashed #999 !important;
- Exclude checks
Unused block argument - f
. You can omit the argument if you don't care about it. Open
fields.each do |f|
- Read upRead up
- Exclude checks
This cop checks for unused block arguments.
Example:
# bad
do_something do |used, unused|
puts used
end
do_something do |bar|
puts :foo
end
define_method(:foo) do |bar|
puts :baz
end
Example:
#good
do_something do |used, _unused|
puts used
end
do_something do
puts :foo
end
define_method(:foo) do |_bar|
puts :baz
end
Rule doesn't have all its properties in alphabetical order. Open
.file-error-message {
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.file-preview {
- Exclude checks
Using height with padding can sometimes make elements larger than you expect. Open
padding: 6px;
- Exclude checks
Possible remote code execution vulnerability in Action Pack Open
actionpack (4.2.5.1)
- Read upRead up
- Exclude checks
Advisory: CVE-2016-2098
Criticality: High
URL: https://groups.google.com/forum/#!topic/rubyonrails-security/ly-IH-fxr_Q
Solution: upgrade to ~> 3.2.22.2, >= 4.2.5.2, ~> 4.2.5, >= 4.1.14.2, ~> 4.1.14
Using height with border can sometimes make elements larger than you expect. Open
border: 2px solid #999;
- Exclude checks
Ambiguous regexp literal. Parenthesize the method arguments if it's surely a regexp literal, or add a whitespace to the right of the /
if it should be a division. Open
Then /^the ([^"]*) of "([^"]*)" should be "([^"]*)"$/ do |arg1, arg2, arg3|
- Read upRead up
- Exclude checks
This cop checks for ambiguous regexp literals in the first argument of a method invocation without parentheses.
Example:
# bad
# This is interpreted as a method invocation with a regexp literal,
# but it could possibly be `/` method invocations.
# (i.e. `do_something./(pattern)./(i)`)
do_something /pattern/i
Example:
# good
# With parentheses, there's no ambiguity.
do_something(/pattern/i)
Rule doesn't have all its properties in alphabetical order. Open
.file-preview-text {
- Exclude checks
Using width with border can sometimes make elements larger than you expect. Open
border: 2px solid #999;
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.file-upload-indicator {
- Exclude checks
Useless assignment to variable - mg_client
. Open
mg_client = Mailgun::Client.new Rails.application.secrets.api_key
- Read upRead up
- Exclude checks
This cop checks for every useless assignment to local variable in every
scope.
The basic idea for this cop was from the warning of ruby -cw
:
assigned but unused variable - foo
Currently this cop has advanced logic that detects unreferenced reassignments and properly handles varied cases such as branch, loop, rescue, ensure, etc.
Example:
# bad
def some_method
some_var = 1
do_something
end
Example:
# good
def some_method
some_var = 1
do_something(some_var)
end
Ambiguous regexp literal. Parenthesize the method arguments if it's surely a regexp literal, or add a whitespace to the right of the /
if it should be a division. Open
Then /^the ([^"]*) of "([^"]*)" in the csv should be "([^"]*)"$/ do |arg1, arg2, arg3|
- Read upRead up
- Exclude checks
This cop checks for ambiguous regexp literals in the first argument of a method invocation without parentheses.
Example:
# bad
# This is interpreted as a method invocation with a regexp literal,
# but it could possibly be `/` method invocations.
# (i.e. `do_something./(pattern)./(i)`)
do_something /pattern/i
Example:
# good
# With parentheses, there's no ambiguity.
do_something(/pattern/i)
Using height with padding can sometimes make elements larger than you expect. Open
padding: 5px;
- Exclude checks