You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Rob Vesse (JIRA)" <ji...@apache.org> on 2017/11/23 15:35:01 UTC

[jira] [Resolved] (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:all-tabpanel ]

Rob Vesse resolved JENA-1434.
-----------------------------
    Resolution: Not A Problem
      Assignee: Rob Vesse

You need to add the {{--stop}} arguments:

{noformat}
mbp-rvesse2:bin rvesse$ ./riot --validate ~/Documents/Work/Datasets/relative.nt 
15:32:43 ERROR riot                 :: [line: 1, col: 1 ] Relative IRI: 
mbp-rvesse2:bin rvesse$ echo $?
0
mbp-rvesse2:bin rvesse$ ./riot --validate --stop ~/Documents/Work/Datasets/relative.nt
15:33:02 ERROR riot                 :: [line: 1, col: 1 ] Relative IRI: 
mbp-rvesse2:bin rvesse$ echo $?
1
{noformat}

> 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)