diff --git a/spec/ameba/rule/style/verbose_block_spec.cr b/spec/ameba/rule/style/verbose_block_spec.cr index f6f9b06f..f324263e 100644 --- a/spec/ameba/rule/style/verbose_block_spec.cr +++ b/spec/ameba/rule/style/verbose_block_spec.cr @@ -92,6 +92,7 @@ module Ameba::Rule::Style .catch(source).should be_valid rule .tap(&.exclude_prefix_operators = false) + .tap(&.exclude_operators = false) .catch(source).should_not be_valid end @@ -190,7 +191,10 @@ module Ameba::Rule::Style (1..3).map { |i| i.in?(1, *foo, 3, **bar) } (1..3).join(separator: '.') { |i| i.to_s } ) - subject.catch(source).should_not be_valid + rule = VerboseBlock.new + rule + .tap(&.exclude_operators = false) + .catch(source).should_not be_valid source.issues.size.should eq(short_block_variants.size) source.issues.each_with_index do |issue, i| diff --git a/src/ameba/rule/style/verbose_block.cr b/src/ameba/rule/style/verbose_block.cr index 433768ca..62d52ca0 100644 --- a/src/ameba/rule/style/verbose_block.cr +++ b/src/ameba/rule/style/verbose_block.cr @@ -22,7 +22,7 @@ module Ameba::Rule::Style # ExcludeMultipleLineBlocks: true # ExcludeCallsWithBlocks: true # ExcludePrefixOperators: true - # ExcludeOperators: false + # ExcludeOperators: true # ExcludeSetters: false # MaxLineLength: ~ # MaxLength: 50 # use ~ to disable @@ -34,7 +34,7 @@ module Ameba::Rule::Style exclude_multiple_line_blocks true exclude_calls_with_block true exclude_prefix_operators true - exclude_operators false + exclude_operators true exclude_setters false max_line_length : Int32? = nil # 100