lib/metanorma/modspec/validate.rb in mn-requirements-0.3.5 vs lib/metanorma/modspec/validate.rb in mn-requirements-0.3.6
- old
+ new
@@ -2,16 +2,14 @@
module Metanorma
class Requirements
class Modspec < Default
def validate(reqt, log)
- @fatalerrors = []
@log ||= log
@ids ||= reqt_links(reqt.document)
reqt_cycles_validate
reqt_link_validate(reqt)
- @fatalerrors
end
def nested_reqt?(reqt)
reqt.at("./ancestor::requirement | ./ancestor::recommendation | " \
"./ancestor::permission")
@@ -128,11 +126,10 @@
def reqt_links1_label(reqt, hash, struct)
return hash unless struct[:label]
if hash[:label][struct[:label]]
msg = "Modspec identifier #{struct[:label]} is used more than once"
- @log.add("Requirements", reqt, msg)
- @fatalerrors << msg
+ @log.add("Requirements", reqt, msg, severity: 0)
end
hash[:label][struct[:label]] = reqt["id"]
hash
end