app/controllers/moves_controller.rb
Assignment Branch Condition size for create is too high. [16.16/15] Open
Open
def create
@move = Move.new(move_params)
authorize @move
respond_to do |format|
if @move.save
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric and https://en.wikipedia.org/wiki/ABC_Software_Metric.
Method has too many lines. [11/10] Open
Open
def create
@move = Move.new(move_params)
authorize @move
respond_to do |format|
if @move.save
- Read upRead up
- Create a ticketCreate a ticket
- 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.
Assignment Branch Condition size for roll is too high. [15.39/15] Wontfix
Wontfix
def roll
hunter = Hunter.find_by(id: params[:hunter_id])
# TODO: raise complaint id unrollable
return unless hunter && @move.rollable?
roll_results = if params[:lucky]
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric and https://en.wikipedia.org/wiki/ABC_Software_Metric.