lib/celluloid_pubsub/base_actor.rb
Add an empty line after magic comments. Open
Open
require_relative './helper'
- Read upRead up
- Exclude checks
Checks for a newline after the final magic comment.
Example:
# good
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end
# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end
Extra blank line detected. Open
Open
if CelluloidPubsub::BaseActor.version_less_than_seventeen?
- Read upRead up
- Exclude checks
This cops checks for two or more consecutive blank lines.
Example:
# bad - It has two empty lines.
some_method
# one empty line
# two empty lines
some_method
# good
some_method
# one empty line
some_method
Avoid using rescue
in its modifier form. Open
Open
celluloid_running = Celluloid.running? rescue false
- Read upRead up
- Exclude checks
This cop checks for uses of rescue in its modifier form.
Example:
# bad
some_method rescue handle_error
# good
begin
some_method
rescue
handle_error
end
Inconsistent indentation detected. Open
Open
Celluloid.boot unless celluloid_running
- Read upRead up
- Exclude checks
This cops checks for inconsistent indentation.
Example:
class A
def test
puts 'hello'
puts 'world'
end
end