jena icon indicating copy to clipboard operation
jena copied to clipboard

shacl validate exit code

Open namedgraph opened this issue 2 years ago • 3 comments

Version

4.7.0

Feature

shacl validate currently returns 0 exit code even when there are violations. Can this be changed to 1?

Are you interested in contributing a solution yourself?

Perhaps?

namedgraph avatar Mar 08 '23 15:03 namedgraph

/me Hoping for a PR to appear.

afs avatar Mar 14 '23 11:03 afs

@afs so you agree it's a good idea? Afaik riot returns non-zero on failure, so this would be an alignment.

Is it around here it should happen? https://github.com/apache/jena/blob/main/jena-cmds/src/main/java/shacl/shacl_validate.java#L60

namedgraph avatar Mar 14 '23 11:03 namedgraph

Something like that. Not sure exactly where - it's been a long time since I looked at the cmd code.

(note some commands have the capbaility of not exiting so a java program can string them together. Not sure if shacl_validate is one of them.)

afs avatar Mar 14 '23 14:03 afs