rkokkelk/siso

View on GitHub
app/controllers/records_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage

Assignment Branch Condition size for create is too high. [26.27/20]
Open

  def create
    file = params[:file]
    verify_file_type file

    key = session_key @repository

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

Use a guard clause instead of wrapping the code inside a conditional expression.
Open

    if !Rails.env.test? && !file.tempfile.is_a?(StringIO)

Use a guard clause instead of wrapping the code inside a conditional expression

Example:

# bad
def test
  if something
    work
  end
end

# good
def test
  return unless something
  work
end

# also good
def test
  work if something
end

# bad
if something
  raise 'exception'
else
  ok
end

# good
raise 'exception' if something
ok

There are no issues that match your filters.

Category
Status