You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A failed assertion with a flag or role of CAUTION is currently considered as a warning. This comes from the implementation in class DefaultSVRLErrorLevelDeterminator, and in particular method getDefaultErrorLevelFromString:
public static IErrorLevel getDefaultErrorLevelFromString (@Nullable final String sFlag)
{
if (sFlag != null)
{
...
if (sFlag.equalsIgnoreCase ("warning") || sFlag.equalsIgnoreCase ("warn") || sFlag.equalsIgnoreCase ("caution"))
return EErrorLevel.WARN;
...
}
return null;
}
@role="CAUTION" – It may not be wrong, but care is required. Or a system might be expected to process the document in a special way because of this.
LSP Information
ISQB S4 TRIVIAL
Is the current implementation of DefaultSVRLErrorLevelDeterminator incorrect in its handling of CAUTION assertions (i.e. should they be mapped instead to EErrorLevel.INFO?
I would debate that the current implementation is correct, but we have had certain of our users point out that it is not (we use the resulting error level to present findings as warnings or errors accordingly).
What is your opinion about this?
The text was updated successfully, but these errors were encountered:
Thanks for ponting that out. Also the reference to the intended error levels is very interesting. As the Schematron documentation may not be there forever, I am taking the liberty of copying the table over:
@role="FATAL" – something so bad that processing or validation should or did stop.
LSP Error
ISQB S1 CRITICAL
@role="ERROR" – something wrong has occurred but processing may continue
LSP Error
ISQB S2 MAJOR
@role="WARN" – something wrong has happened, but it does not necessarily require action
LSP Warning
ISQB S3 MINOR
@role="CAUTION" – It may not be wrong, but care is required. Or a system might be expected to process the document in a special way because of this.
LSP Information
ISQB S4 TRIVIAL
@role="INFO" – some information is being reported
LSP Information
@role="HINT" – some hint is being given to the user
LSP Hint
@role="TRACE" – some information on execution is being reported.
LSP Information
@role="DEBUG" – some information that is not intended for exposure in production.
LSP Hint
Thanks for the fast reaction @phax ! No problem to wait for 8.0.1. As you already expose the role value on the resulting messages we can already check it and "force" an information level.
A failed assertion with a flag or role of
CAUTION
is currently considered as a warning. This comes from the implementation in classDefaultSVRLErrorLevelDeterminator
, and in particular methodgetDefaultErrorLevelFromString
:However, when referring to https://schematron.com/document/141.html there is a suggestion to treat "CAUTION" as "LSP information":
Is the current implementation of
DefaultSVRLErrorLevelDeterminator
incorrect in its handling ofCAUTION
assertions (i.e. should they be mapped instead toEErrorLevel.INFO
?I would debate that the current implementation is correct, but we have had certain of our users point out that it is not (we use the resulting error level to present findings as warnings or errors accordingly).
What is your opinion about this?
The text was updated successfully, but these errors were encountered: