mirror of
				https://gitea.invidious.io/iv-org/shard-ameba.git
				synced 2024-08-15 00:53:29 +00:00 
			
		
		
		
	ConstantNames: correct reported end_location
This commit is contained in:
		
							parent
							
								
									9885457227
								
							
						
					
					
						commit
						e951c0772a
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -43,7 +43,7 @@ module Ameba
 | 
				
			||||||
      issue = s.issues.first
 | 
					      issue = s.issues.first
 | 
				
			||||||
      issue.rule.should_not be_nil
 | 
					      issue.rule.should_not be_nil
 | 
				
			||||||
      issue.location.to_s.should eq "source.cr:1:1"
 | 
					      issue.location.to_s.should eq "source.cr:1:1"
 | 
				
			||||||
      issue.end_location.to_s.should eq "source.cr:1:9"
 | 
					      issue.end_location.to_s.should eq "source.cr:1:5"
 | 
				
			||||||
      issue.message.should eq(
 | 
					      issue.message.should eq(
 | 
				
			||||||
        "Constant name should be screaming-cased: CONST, not Const"
 | 
					        "Constant name should be screaming-cased: CONST, not Const"
 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,7 +38,7 @@ module Ameba::Rule::Style
 | 
				
			||||||
        name = target.names.first
 | 
					        name = target.names.first
 | 
				
			||||||
        return if (expected = name.upcase) == name
 | 
					        return if (expected = name.upcase) == name
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        issue_for node, MSG % {expected, name}
 | 
					        issue_for target, MSG % {expected, name}
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue