lib/rubocop/cop/rubymotion/do_not_call_retaincount.rb
Trailing whitespace detected. Open
Open
- Exclude checks
Extra empty line detected at module body beginning. Open
Open
class DoNotCallRetaincount < Cop
- Read upRead up
- Exclude checks
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
Open
MESSAGE = "Do not use retainCount"
- Read upRead up
- Exclude checks
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
Open
if (node.children.last == :retainCount) ||
- Exclude checks
Line is too long. [89/80] Open
Open
(node.children[1] == :send && node.children.last.children == [:retainCount])
- Exclude checks
Extra empty line detected at class body beginning. Open
Open
MESSAGE = "Do not use retainCount"
- Read upRead up
- Exclude checks
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
Open
- Exclude checks