w3c / shacl

SHACL Community Group (Post-REC activitities)
32 stars 5 forks source link

Add severity levels that are not violations #42

Open bergos opened 9 months ago

bergos commented 9 months ago

sh:Info, sh:Warning, and sh:Violation are defined as violations. It would be good to have severity levels not defined as violations. They could show detailed information on which constraints have been processed.

shacl-engine already uses two new levels in its own namespace:

HolgerKnublauch commented 9 months ago

I have never quite understood why sh:Info counts as a violation.

HolgerKnublauch commented 9 months ago

See also https://datashapes.org/dash.html#results

bergos commented 9 months ago

We should have both; dash:*Result classes in the SHACL namespace and additional levels.

Info, Warning, and Violation (Error) match the typical levels of loggers with messages an end-user would see. Debug and Trace would be the levels for shape developers, like in the use cases I described previously.

The spec could explicitly mention that an implementation is allowed to have a parameter to change the severity level where the result becomes a failure/violation. With the default set to Info this would not be a breaking change. The new result classes should be used according to the setting given to the engine.