Instead of having a satisfied state, we now have a severity. Where Severity::Error means satisfied=false and everything else satisfied=true.
Instead of using the Output::None variant to report satisfied=false, this is now down by the "severity". Output is reduced to only carry the (value) output information, which is either "transformed" or "identity"
By default functionality which returned satisifed=false now return Severity::Error. Functionality which required to check of satisfied=true now checks for severity < Severity::Error (as severities are ordered).
This PR isn't finished. There are some things to work on:
[x] Fix all tests (a lot of them don't compile because of a change API). After adapting to the new API, things should work as before, as most of the logic should (is expected to be) still valid
[x] Check all aggregating functions. Based on the idea of "satisfied", they should work the same. But I need to check the cases of "in the middle" (advice, warning). Add tests for those too.
This adds the concept of severities (warning, advice, error).
It takes a different approach than explored in https://github.com/seedwing-io/rfcs/pull/1. It does not add a set of reasons for each severity/level, but only one.
The main changes in this PR are:
satisfied
state, we now have aseverity
. WhereSeverity::Error
meanssatisfied=false
and everything elsesatisfied=true
.Output::None
variant to reportsatisfied=false
, this is now down by the "severity". Output is reduced to only carry the (value) output information, which is either "transformed" or "identity"satisifed=false
now returnSeverity::Error
. Functionality which required to check ofsatisfied=true
now checks forseverity < Severity::Error
(as severities are ordered).This PR isn't finished. There are some things to work on: