mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Syntax rule running priorities
This commit is contained in:
parent
c9db63bf34
commit
4c85ad7c75
8 changed files with 64 additions and 12 deletions
|
@ -50,6 +50,21 @@ module Ameba
|
|||
it "excludes source from this rule" do
|
||||
create_todo.should contain "Excluded:\n - source.cr"
|
||||
end
|
||||
|
||||
context "when invalid syntax" do
|
||||
it "does not exclude Syntax rule" do
|
||||
file = IO::Memory.new
|
||||
formatter = Formatter::TODOFormatter.new IO::Memory.new, file
|
||||
|
||||
s = Source.new "def invalid_syntax"
|
||||
s.error Rule::Syntax.new, s.location(1, 2), "message"
|
||||
|
||||
formatter.finished [s]
|
||||
content = file.to_s
|
||||
|
||||
content.should_not contain "Syntax"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue