app/helpers/application_helper.rb
Method has too many lines. [597/30] Open
Open
def get_bad_word
bad_words = ["babaca",
"babacÊo",
"babacão",
"babacaum",
- Read upRead up
- Exclude checks
This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Module has too many lines. [638/250] Open
Open
module ApplicationHelper
def set_average_style(average)
case average
when "Péssimo"
- Read upRead up
- Exclude checks
This cop checks if the length a module exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.
Method get_bad_word
has 597 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def get_bad_word
bad_words = ["babaca",
"babacÊo",
"babacão",
"babacaum",
File application_helper.rb
has 639 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module ApplicationHelper
def set_average_style(average)
case average
when "Péssimo"
Avoid too many return
statements within this method. Open
Open
return nil
Avoid too many return
statements within this method. Open
Open
return 'concept-excellent'
Useless assignment to variable - bad_words
. Open
Open
bad_words = ["babaca",
- 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