[Validation] Exit codes?

Make a request or discuss new features.
Post Reply
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

[Validation] Exit codes?

Post by inspector71 »

Thanks for RJTE, it's very useful and a valued tool.

In version 14.73 (64 bit), when running HTML > Offline Validation > Validate XML ... and probably in other validation scenarios ... we may get a result that only contains an unfortunately meaningless "exit code" number.

Had a quick look around and I can only find the HTML Tidy website, which appears somewhat extensive but may lack an error code reference - or I just cannot find it!

Could we integrate an HTML Tidy quick reference into RJTE?

Rather than just returning this:

Image
Last edited by inspector71 on 17 Feb 2022 11:02, edited 1 time in total.
User avatar
pjj
Posts: 2109
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: [Validation] Exit codes?

Post by pjj »

inspector71 wrote: 17 Feb 2022 03:09 Could we integrate an HTML Tody quick reference into RJTE?
I'm not sure what you mean by "Tidy quick reference", anyway please notice that what your screenshot shows is only the final part of Tidy's output, and if you scroll up a bit you will see actual list of errors, so the whole message may look like this:

Code: Select all

Config: unknown option: drop-font-tags

line 1 column 1 - Warning: missing <!DOCTYPE> declaration

line 1 column 1 - Warning: inserting implicit <body>

line 1 column 1 - Warning: inserting missing 'title' element

Info: Document content looks like XHTML5

Tidy found 3 warnings and 0 errors!




About HTML Tidy: https://github.com/htacg/tidy-html5

Bug reports and comments: https://github.com/htacg/tidy-html5/issues

Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/

Latest HTML specification: http://dev.w3.org/html5/spec-author-view/

Validate your HTML documents: http://validator.w3.org/nu/

Lobby your company to join the W3C: http://www.w3.org/Consortium



Do you speak a language other than English, or a different variant of 

English? Consider helping us to localize HTML Tidy. For details please see 

https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md

Process completed with exit code: 1
Done
Tidy's exit codes are indeed rather cryptic, but they're just flags; here's their meaning:
0 No warnings or errors
1 Warnings
2 Errors
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
inspector71
Posts: 220
Joined: 22 Sep 2017 07:59

Re: [Validation] Exit codes?

Post by inspector71 »

pjj wrote: 17 Feb 2022 09:36
inspector71 wrote: 17 Feb 2022 03:09 Could we integrate an HTML Tidy quick reference into RJTE?
I'm not sure what you mean by "Tidy quick reference", anyway please notice that what your screenshot shows is only the final part of Tidy's output, and if you scroll up a bit you will see actual list of errors, so the whole message may look like this:

Code: Select all

Config: unknown option: drop-font-tags

line 1 column 1 - Warning: missing <!DOCTYPE> declaration

line 1 column 1 - Warning: inserting implicit <body>

line 1 column 1 - Warning: inserting missing 'title' element

Info: Document content looks like XHTML5

Tidy found 3 warnings and 0 errors!




About HTML Tidy: https://github.com/htacg/tidy-html5

Bug reports and comments: https://github.com/htacg/tidy-html5/issues

Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/

Latest HTML specification: http://dev.w3.org/html5/spec-author-view/

Validate your HTML documents: http://validator.w3.org/nu/

Lobby your company to join the W3C: http://www.w3.org/Consortium



Do you speak a language other than English, or a different variant of 

English? Consider helping us to localize HTML Tidy. For details please see 

https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md

Process completed with exit code: 1
Done
Tidy's exit codes are indeed rather cryptic, but they're just flags; here's their meaning:
0 No warnings or errors
1 Warnings
2 Errors
Thanks pjj.

I did realise that all too late! Haha.

Regarding a quick reference, even just those exit code explanations would be a start but I also imagine - perhaps falsely - there's more that could be explained.

Alas, I cannot currently check the online help to see if such a reference is already there because it's broken. Creates a race condition loading the frameset repeatedly within the main frame, Russian dolls style.

I was thinking maybe something like the Emmet cheat sheet though (which I've seen before the frameset issue and was helpful).

The other content it could include is an explanation of all the options though they are, indirectly, also available elsewhere ... but may not be the same labelling as RJTE or correlate to the same library version.

I see you posted elsewhere of a new Tidy release that might be worth updating to. Just found that in a search of this forum for "Tidy". Might be a very old post. How did you determine the current Tidy library (libtidy) in use within RJTE?
User avatar
pjj
Posts: 2109
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: [Validation] Exit codes?

Post by pjj »

inspector71 wrote: 17 Feb 2022 10:51 Regarding a quick reference, even just those exit code explanations would be a start but I also imagine - perhaps falsely - there's more that could be explained.

Alas, I cannot currently check the online help to see if such a reference is already there because it's broken. Creates a race condition loading the frameset repeatedly within the main frame, Russian dolls style.
Yeah, I know what you mean -- however right now it works well for me (I reported this issue to Rickard a couple of months ago, he suggested it was due to temporary server error, but it might be so because of my browser's settings as well).

As for the Tidy error codes -- no, they're not mentioned in the on-line help for RJ TE.
inspector71 wrote: 17 Feb 2022 10:51 The other content it could include is an explanation of all the options though they are, indirectly, also available elsewhere ... but may not be the same labelling as RJTE or correlate to the same library version.
These options are described here, and Tidy's main page is here at Github. (You can easily set them up from within RJ TE at HTML > Offline validation > Beautify and Validate Options...)
inspector71 wrote: 17 Feb 2022 10:51 I see you posted elsewhere of a new Tidy release that might be worth updating to. Just found that in a search of this forum for "Tidy". Might be a very old post. How did you determine the current Tidy library (libtidy) in use within RJTE?
Just tidy -v on the command line (mine says it's 5.7.28), I guess you can just overwrite it with the newest one.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
Post Reply