Raise when empty severity provided to SeverityYamlConverter.from_yaml

This commit is contained in:
Sijawusz Pur Rahnama 2023-05-09 13:02:10 +02:00 committed by GitHub
parent 14f6ba0c0b
commit d0d8b18c83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,7 @@ module Ameba
case value = node.value
when String then Severity.parse(value)
when Nil then nil
when Nil then raise "Missing severity"
else
raise "Incorrect severity: #{value}"
end