HipByte/codeclimate-rubymotion

View on GitHub
lib/rubocop/cop/rubymotion/do_not_call_retaincount.rb

Summary

Maintainability
A
0 mins
Test Coverage

Trailing whitespace detected.
Open

        

Extra empty line detected at module body beginning.
Open


      class DoNotCallRetaincount < Cop

This cops checks if empty lines around the bodies of modules match the configuration.

Example: EnforcedStyle: empty_lines

# good

module Foo

  def bar
    # ...
  end

end

Example: EnforcedStyle: emptylinesexcept_namespace

# good

module Foo
  module Bar

    # ...

  end
end

Example: EnforcedStyle: emptylinesspecial

# good
module Foo

  def bar; end

end

Example: EnforcedStyle: noemptylines (default)

# good

module Foo
  def bar
    # ...
  end
end

Freeze mutable objects assigned to constants.
Open

        MESSAGE = "Do not use retainCount"

This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

Example:

# bad
CONST = [1, 2, 3]

# good
CONST = [1, 2, 3].freeze

Trailing whitespace detected.
Open

          if (node.children.last == :retainCount) || 

Line is too long. [89/80]
Open

             (node.children[1] == :send && node.children.last.children == [:retainCount])

Extra empty line detected at class body beginning.
Open


        MESSAGE = "Do not use retainCount"

This cops checks if empty lines around the bodies of classes match the configuration.

Example: EnforcedStyle: empty_lines

# good

class Foo

  def bar
    # ...
  end

end

Example: EnforcedStyle: emptylinesexcept_namespace

# good

class Foo
  class Bar

    # ...

  end
end

Example: EnforcedStyle: emptylinesspecial

# good
class Foo

  def bar; end

end

Example: EnforcedStyle: noemptylines (default)

# good

class Foo
  def bar
    # ...
  end
end

Trailing whitespace detected.
Open

      

There are no issues that match your filters.

Category
Status