mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Track issue.end_location properly
This commit is contained in:
parent
ad2c6bad0e
commit
9885457227
45 changed files with 90 additions and 20 deletions
|
@ -27,6 +27,7 @@ module Ameba::Rule::Layout
|
|||
issue = source.issues.first
|
||||
issue.rule.should eq subject
|
||||
issue.location.to_s.should eq "source.cr:1:#{subject.max_length + 1}"
|
||||
issue.end_location.should be_nil
|
||||
issue.message.should eq "Line too long"
|
||||
end
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ module Ameba::Rule::Layout
|
|||
issue = source.issues.first
|
||||
issue.rule.should_not be_nil
|
||||
issue.location.to_s.should eq "source.cr:3:1"
|
||||
issue.end_location.should be_nil
|
||||
issue.message.should eq "Blank lines detected at the end of the file"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,6 +21,7 @@ module Ameba::Rule::Layout
|
|||
issue = source.issues.first
|
||||
issue.rule.should_not be_nil
|
||||
issue.location.to_s.should eq "source.cr:2:7"
|
||||
issue.end_location.should be_nil
|
||||
issue.message.should eq "Trailing whitespace detected"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue