ChaelCodes/HuntersKeepers

View on GitHub
app/controllers/moves_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage

Assignment Branch Condition size for create is too high. [16.16/15]
Open

  def create
    @move = Move.new(move_params)
    authorize @move
    respond_to do |format|
      if @move.save
Severity: Minor
Found in app/controllers/moves_controller.rb by rubocop

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

  def create
    @move = Move.new(move_params)
    authorize @move
    respond_to do |format|
      if @move.save
Severity: Minor
Found in app/controllers/moves_controller.rb by rubocop

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

  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]
Severity: Minor
Found in app/controllers/moves_controller.rb by rubocop

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.

There are no issues that match your filters.

Category
Status