WebIDL checker

View: New views
5 Messages — Rating Filter:   Alert me  

WebIDL checker

by Dominique Hazael-Massieux-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

(bcc to public-html, public-webapps, public-device-apis)

Hello,

I have just released a simple on-line WebIDL checker:
http://www.w3.org/2009/07/webidl-check
It detects bugs in the WebIDLs it finds inside HTML documents - it looks
for <pre> elements with a class set to "idl" or "webidl", and then
validates what it extracts using Aplix' widlproc:
http://widl.webvm.net/svn/widlproc/trunk/doc/widlproc.html

See it for instance:
 * applied to HTML5: http://www.w3.org/2009/07/webidl-check?doc=http%3A%
2F%2Fdev.w3.org%2Fhtml5%2Fspec%2FOverview.html
 * to Geolocation: http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F
%2Fwww.w3.org%2FTR%2F2009%2FWD-geolocation-API-20090707%2F

More details on my blog:
http://people.w3.org/~dom/archives/2009/07/webidl-checker/

I'm open for suggestions of improvements - in particular if having a
other output formats in addition to the HTML report would be useful.

Hope this useful to some,

Dom




RE: WebIDL checker

by Marcin Hanclik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dom,

Thanks for the very useful tool!

I think it should be clarified what validity means.
I did similar tool for BONDI APIs, and the problems I encountered were related to the BONDI Design Patterns we agreed on there.
E.g. Web IDL itself may be correct on syntax level, but it may violate the design patterns by wrong inheritance, wrong naming, wrong values for constants etc. I call this a semantic checker.
I understand this could be first done once we have some design patterns e.g. in DAP and probably then only for DAP.

The specification of the generated HTML would be good.
It could be something like "spec of the spec".
I mean here documenting the classes you use in the output, like "interface", "attributes", "attribute", "consts" etc.

Thanks.

Kind regards,
Marcin

BTW: Little typo: In the generated output there is missing a space between attribute's and constants' type and name.

Marcin Hanclik
ACCESS Systems Germany GmbH
Tel: +49-208-8290-6452  |  Fax: +49-208-8290-6465
Mobile: +49-163-8290-646
E-Mail: marcin.hanclik@...

-----Original Message-----
From: public-device-apis-request@... [mailto:public-device-apis-request@...] On Behalf Of Dominique Hazael-Massieux
Sent: Thursday, July 30, 2009 9:21 AM
To: spec-prod@...
Subject: WebIDL checker

(bcc to public-html, public-webapps, public-device-apis)

Hello,

I have just released a simple on-line WebIDL checker:
http://www.w3.org/2009/07/webidl-check
It detects bugs in the WebIDLs it finds inside HTML documents - it looks
for <pre> elements with a class set to "idl" or "webidl", and then
validates what it extracts using Aplix' widlproc:
http://widl.webvm.net/svn/widlproc/trunk/doc/widlproc.html

See it for instance:
 * applied to HTML5: http://www.w3.org/2009/07/webidl-check?doc=http%3A%
2F%2Fdev.w3.org%2Fhtml5%2Fspec%2FOverview.html
 * to Geolocation: http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F
%2Fwww.w3.org%2FTR%2F2009%2FWD-geolocation-API-20090707%2F

More details on my blog:
http://people.w3.org/~dom/archives/2009/07/webidl-checker/

I'm open for suggestions of improvements - in particular if having a
other output formats in addition to the HTML report would be useful.

Hope this useful to some,

Dom




________________________________________

Access Systems Germany GmbH
Essener Strasse 5  |  D-46047 Oberhausen
HRB 13548 Amtsgericht Duisburg
Geschaeftsfuehrer: Michel Piquemal, Tomonori Watanabe, Yusuke Kanda

www.access-company.com

CONFIDENTIALITY NOTICE
This e-mail and any attachments hereto may contain information that is privileged or confidential, and is intended for use only by the
individual or entity to which it is addressed. Any disclosure, copying or distribution of the information by anyone else is strictly prohibited.
If you have received this document in error, please notify us promptly by responding to this e-mail. Thank you.


Re: WebIDL checker

by Anne van Kesteren-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 30 Jul 2009 09:20:40 +0200, Dominique Hazael-Massieux <dom@...> wrote:
> I have just released a simple on-line WebIDL checker:
> http://www.w3.org/2009/07/webidl-check
> It detects bugs in the WebIDLs it finds inside HTML documents - it looks
> for <pre> elements with a class set to "idl" or "webidl", and then
> validates what it extracts using Aplix' widlproc:
> http://widl.webvm.net/svn/widlproc/trunk/doc/widlproc.html

Awesome! It seems to contain a few bugs however:

http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F%2Fdev.w3.org%2Fcsswg%2Fcssom-view%2F

It is probably that I'm using some of the newer features that have not been integrated into the checker yet.

Cheers,


--
Anne van Kesteren
http://annevankesteren.nl/


Re: WebIDL checker

by Dominique Hazael-Massieux-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le jeudi 30 juillet 2009 à 12:00 +0200, Anne van Kesteren a écrit :
> On Thu, 30 Jul 2009 09:20:40 +0200, Dominique Hazael-Massieux <dom@...> wrote:
> > I have just released a simple on-line WebIDL checker:
> > http://www.w3.org/2009/07/webidl-check
> > It detects bugs in the WebIDLs it finds inside HTML documents - it looks
> > for <pre> elements with a class set to "idl" or "webidl", and then
> > validates what it extracts using Aplix' widlproc:
> > http://widl.webvm.net/svn/widlproc/trunk/doc/widlproc.html
>
> Awesome!

Thanks! Most of the merits come from Kai and Tim from Aplix, fwiw, since
they produced widlproc.

> It seems to contain a few bugs however:
> http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F%2Fdev.w3.org%2Fcsswg%2Fcssom-view%2F
>
> It is probably that I'm using some of the newer features that have not been integrated into the checker yet.

Indeed, the underlying processor (widlproc) is based on the grammar of
the current TR version of WebIDL; I understand that updating it with a
newer grammar should be just a matter of updating
http://widl.webvm.net/svn/widlproc/trunk/src/grammar and recompiling
widlproc; I guess I'm leaning toward doing that when a new version of
WebIDL gets into TR.

(I've also made sure that the checker detects WebIDL examples in the
WebIDL spec itself, which highlights the current missing features of
widlproc:
http://www.w3.org/2009/07/webidl-check?doc=http%3A%2F%2Fdev.w3.org%
2F2006%2Fwebapi%2FWebIDL%2F )

Dom




Re: WebIDL checker

by Ian Hickson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 30 Jul 2009, Dominique Hazael-Massieux wrote:
>
> I have just released a simple on-line WebIDL checker:
> http://www.w3.org/2009/07/webidl-check It detects bugs in the WebIDLs it
> finds inside HTML documents - it looks for <pre> elements with a class
> set to "idl" or "webidl", and then validates what it extracts using
> Aplix' widlproc:
> http://widl.webvm.net/svn/widlproc/trunk/doc/widlproc.html

This is fantastic.

I have a small feature request. Would it be possible to have a mode
wherein the script returns an empty document if it parses the provided URL
without problems, and returns a text/plain document with one error per
line with line numbers reporting the errors if it finds any? That would
let me integrate this with my build tools and find errors as I make them.

--
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'