You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Ian Dickinson (JIRA)" <ji...@apache.org> on 2017/11/23 15:54:00 UTC
[jira] [Commented] (JENA-1434) Set exit status code when riot is
running in --validate mode
[ https://issues.apache.org/jira/browse/JENA-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16264497#comment-16264497 ]
Ian Dickinson commented on JENA-1434:
-------------------------------------
Thanks Rob. It appears that `--stop` only works for error, not warnings:
{noformat}
ian@ian-desktop $ riot --validate --stop temp/alert.ttl
15:49:12 WARN riot :: [line: 39, col: 25] Lexical form '2017-03-19T00:00:00+00:00' not valid for datatype XSD date
15:49:12 WARN riot :: [line: 42, col: 20] Lexical form '' not valid for datatype XSD date
15:49:12 WARN riot :: [line: 47, col: 25] Lexical form '2017-11-19T00:00:00+00:00' not valid for datatype XSD date
15:49:12 WARN riot :: [line: 50, col: 20] Lexical form '' not valid for datatype XSD date
15:49:12 WARN riot :: [line: 55, col: 25] Lexical form '2017-02-20T00:00:00+00:00' not valid for datatype XSD date
15:49:12 WARN riot :: [line: 58, col: 20] Lexical form '' not valid for datatype XSD date
ian@ian-desktop $ echo $?
0
{noformat}
I would still argue that, when you specifically ask for validation with --validate, a non-zero termination status is warranted even for warnings. Different status values could be used for warnings and for errors.
> Set exit status code when riot is running in --validate mode
> ------------------------------------------------------------
>
> Key: JENA-1434
> URL: https://issues.apache.org/jira/browse/JENA-1434
> Project: Apache Jena
> Issue Type: Improvement
> Components: RIOT
> Affects Versions: Jena 3.5.0
> Reporter: Ian Dickinson
> Assignee: Rob Vesse
>
> I would like to use `riot --validate` as part of an integration test for a system that generates Turtle. Ideally, the exit status for the riot command would be non-zero, indicating a problem, if the input was not valid. However, I see an exit status of zero always:
> {noformat}
> $ riot --validate alert.ttl && echo 'exit status is: ' $?
> 13:50:37 WARN riot :: [line: 39, col: 25] Lexical form '2017-03-19T00:00:00+00:00' not valid for datatype XSD date
> 13:50:37 WARN riot :: [line: 42, col: 20] Lexical form '' not valid for datatype XSD date
> 13:50:37 WARN riot :: [line: 58, col: 20] Lexical form '' not valid for datatype XSD date
> exit status is: 0
> {noformat}
> Version info:
> {noformat}
> $ riot --version
> Jena: VERSION: 3.5.0
> Jena: BUILD_DATE: 2017-10-30T09:20:28+0000
> RIOT: VERSION: 3.5.0
> RIOT: BUILD_DATE: 2017-10-30T09:20:28+0000
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)