lib/anonymous_finished_after_filter.rb

Summary

Maintainability
A
0 mins
Test Coverage

Assignment Branch Condition size for included is too high. [20.83/15]
Open

    def self.included(klass)
      class_key = klass.name.sub('Controller', '').tableize
      class_key = class_key.singularize if %w(audio video).include?(class_key.singularize)

      specs = []

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

Method has too many lines. [13/10]
Open

    def self.included(klass)
      class_key = klass.name.sub('Controller', '').tableize
      class_key = class_key.singularize if %w(audio video).include?(class_key.singularize)

      specs = []

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.

%w-literals should be delimited by [ and ].
Open

      class_key = class_key.singularize if %w(audio video).include?(class_key.singularize)

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

Avoid multi-line chains of blocks.
Open

          end.flatten.select do |s|

This cop checks for chaining of a block after another block that spans multiple lines.

Example:

Thread.list.find_all do |t|
  t.alive?
end.map do |t|
  t.object_id
end

There are no issues that match your filters.

Category
Status