mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Merge pull request #356 from crystal-ameba/chore/crystal-nightly
chore: fix crystal-nightly compatibility
This commit is contained in:
commit
81177dc7e4
3 changed files with 8 additions and 12 deletions
|
@ -34,7 +34,7 @@ module Ameba
|
||||||
end
|
end
|
||||||
|
|
||||||
it "raises when name is incorrect" do
|
it "raises when name is incorrect" do
|
||||||
expect_raises(Exception, "Incorrect severity name BadName. Try one of [Error, Warning, Convention]") do
|
expect_raises(Exception, "Incorrect severity name BadName. Try one of: Error, Warning, Convention") do
|
||||||
Severity.parse("BadName")
|
Severity.parse("BadName")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,19 +3,15 @@ module Ameba::Rule::Lint
|
||||||
#
|
#
|
||||||
# For example, this is considered invalid:
|
# For example, this is considered invalid:
|
||||||
#
|
#
|
||||||
# ```
|
# def foo
|
||||||
# def foo
|
# yield 42
|
||||||
# yield 42
|
# end
|
||||||
# end
|
|
||||||
# ```
|
|
||||||
#
|
#
|
||||||
# And has to be written as the following:
|
# And has to be written as the following:
|
||||||
#
|
#
|
||||||
# ```
|
# def foo(&)
|
||||||
# def foo(&)
|
# yield 42
|
||||||
# yield 42
|
# end
|
||||||
# end
|
|
||||||
# ```
|
|
||||||
#
|
#
|
||||||
# YAML configuration example:
|
# YAML configuration example:
|
||||||
#
|
#
|
||||||
|
|
|
@ -41,7 +41,7 @@ module Ameba
|
||||||
def self.parse(name : String)
|
def self.parse(name : String)
|
||||||
super name
|
super name
|
||||||
rescue ArgumentError
|
rescue ArgumentError
|
||||||
raise "Incorrect severity name #{name}. Try one of #{values}"
|
raise "Incorrect severity name #{name}. Try one of: #{values.map(&.to_s).join(", ")}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue