mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Lint in parallel (#118)
* Lint in parallel * Synced output for dot/flycheck formatters * Re-raise exceptions raised in fibers * Add readme instructions
This commit is contained in:
parent
8d00d54012
commit
07e72b7bf9
6 changed files with 101 additions and 20 deletions
|
@ -53,6 +53,19 @@ module Ameba
|
|||
Runner.new(all_rules, [source], formatter, default_severity).run.success?.should be_true
|
||||
end
|
||||
|
||||
context "exception in rule" do
|
||||
it "raises an exception raised in fiber while running a rule" do
|
||||
rule = RaiseRule.new
|
||||
rule.should_raise = true
|
||||
rules = [rule] of Rule::Base
|
||||
source = Source.new "", "source.cr"
|
||||
|
||||
expect_raises(Exception, "something went wrong") do
|
||||
Runner.new(rules, [source], formatter, default_severity).run
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "invalid syntax" do
|
||||
it "reports a syntax error" do
|
||||
rules = [Rule::Lint::Syntax.new] of Rule::Base
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue