mirror of
				https://gitea.invidious.io/iv-org/shard-ameba.git
				synced 2024-08-15 00:53:29 +00:00 
			
		
		
		
	Default to exclude_multiple_line_blocks in Style/VerboseBlock rule
This commit is contained in:
		
							parent
							
								
									6e622456ff
								
							
						
					
					
						commit
						56110b3883
					
				
					 2 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -128,6 +128,7 @@ module Ameba::Rule::Style
 | 
				
			||||||
          end
 | 
					          end
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        rule = VerboseBlock.new
 | 
					        rule = VerboseBlock.new
 | 
				
			||||||
 | 
					          .tap(&.exclude_multiple_line_blocks = false)
 | 
				
			||||||
        rule
 | 
					        rule
 | 
				
			||||||
          .tap(&.max_line_length = 60)
 | 
					          .tap(&.max_line_length = 60)
 | 
				
			||||||
          .catch(source).should be_valid
 | 
					          .catch(source).should be_valid
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@ module Ameba::Rule::Style
 | 
				
			||||||
  # Style/VerboseBlock:
 | 
					  # Style/VerboseBlock:
 | 
				
			||||||
  #   Enabled: true
 | 
					  #   Enabled: true
 | 
				
			||||||
  #   ExcludeMultipleLineBlocks: true
 | 
					  #   ExcludeMultipleLineBlocks: true
 | 
				
			||||||
  #   ExcludeCallsWithBlocks: false
 | 
					  #   ExcludeCallsWithBlocks: true
 | 
				
			||||||
  #   ExcludePrefixOperators: true
 | 
					  #   ExcludePrefixOperators: true
 | 
				
			||||||
  #   ExcludeOperators: false
 | 
					  #   ExcludeOperators: false
 | 
				
			||||||
  #   ExcludeSetters: false
 | 
					  #   ExcludeSetters: false
 | 
				
			||||||
| 
						 | 
					@ -31,8 +31,8 @@ module Ameba::Rule::Style
 | 
				
			||||||
    properties do
 | 
					    properties do
 | 
				
			||||||
      description "Identifies usage of collapsible single expression blocks."
 | 
					      description "Identifies usage of collapsible single expression blocks."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      exclude_multiple_line_blocks true
 | 
				
			||||||
      exclude_calls_with_block true
 | 
					      exclude_calls_with_block true
 | 
				
			||||||
      exclude_multiple_line_blocks false
 | 
					 | 
				
			||||||
      exclude_prefix_operators true
 | 
					      exclude_prefix_operators true
 | 
				
			||||||
      exclude_operators false
 | 
					      exclude_operators false
 | 
				
			||||||
      exclude_setters false
 | 
					      exclude_setters false
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue