mirror of
				https://gitea.invidious.io/iv-org/shard-ameba.git
				synced 2024-08-15 00:53:29 +00:00 
			
		
		
		
	Do not treat paths as literals in Lint/LiteralAssignmentsInExpressions
				
					
				
			This commit is contained in:
		
							parent
							
								
									1261f4ba6d
								
							
						
					
					
						commit
						0bd4ed0c45
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -35,7 +35,7 @@ module Ameba::Rule::Lint
 | 
			
		|||
 | 
			
		||||
    def test(source, node : Crystal::If | Crystal::Unless | Crystal::Case | Crystal::While | Crystal::Until)
 | 
			
		||||
      return unless (cond = node.cond).is_a?(Crystal::Assign)
 | 
			
		||||
      return unless literal?(cond.value, include_paths: true)
 | 
			
		||||
      return unless literal?(cond.value)
 | 
			
		||||
 | 
			
		||||
      issue_for cond, MSG
 | 
			
		||||
    end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue