Skip to content

Commit 250e8b1

Browse files
committed
Fix rubocop offenses
1 parent a2cf162 commit 250e8b1

6 files changed

Lines changed: 8 additions & 7 deletions

File tree

config/rubocop.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ ConstantName:
7272
TrivialAccessors:
7373
Enabled: false
7474

75-
# Do not prefer do/end over {} for multiline blocks
76-
Blocks:
77-
Enabled: false
78-
7975
# I like to have an empty line before closing the currently opened body
8076
EmptyLinesAroundBlockBody:
8177
Enabled: false

lib/unparser/cli.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def self.run(*arguments)
3838
# @api private
3939
#
4040
def initialize(arguments)
41-
@sources, @ignore = [], Set.new
41+
@sources = []
42+
@ignore = Set.new
4243

4344
@success = true
4445
@fail_fast = false

lib/unparser/emitter/class.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def emit_superclass
4141
end # Class
4242

4343
# Emitter for sclass nodes
44-
class SClass < self
44+
class SClass < self
4545
include Terminated
4646

4747
handle :sclass

lib/unparser/emitter/send/unary.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ module Unparser
44
class Emitter
55
class Send
66
# Emitter for unary sends
7+
#
8+
# rubocop:disable Style/HashSyntax
9+
# ^^ is false positive
710
class Unary < self
811
include Unterminated
912

spec/integration/unparser/corpus_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
require 'spec_helper'
44

5+
# rubocop:disable ClosingParenthesisIndentation
56
describe 'Unparser on ruby corpus' do
67
before do
78
if RUBY_VERSION < '2.1.0'

spec/unit/unparser_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def assert_round_trip(input, parser)
3030
ast, comments = parser.parse_with_comments(input)
3131
generated = Unparser.unparse(ast, comments)
3232
expect(generated).to eql(input)
33-
generated_ast, _ = parser.parse_with_comments(generated)
33+
generated_ast, _comments = parser.parse_with_comments(generated)
3434
expect(ast == generated_ast).to be(true)
3535
end
3636

0 commit comments

Comments
 (0)