Asciidoctor warnings as XML file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Asciidoctor warnings as XML file

Jeremie Bresson
Maybe this is related to the "Logger Framework" mentioned in this thread (and issue #44) but I am wondering if someone has already produced an XML file containing all the warning/error found by Asciidoctor.

A long time ago I did some experiment with the output format produced by the Checkstyle library:
(I have found this article: "How to Transform the Results from Findbugs, Checkstyle and PMD to HTML Report with XSLT 2.0 and Java?" that provide an example of the XML format.)

The big advantage is that if you produce a file like this (instead of the plain text description in the Log) you can integrate it with other Tools. In my case I did some experiments with the Checkstyle plugin for Jenkins.

As an example, instead of producing those logs:
asciidoctor: WARNING: example-manual.adoc: line 17: list item index: expected 2, got 1
asciidoctor: WARNING: example-manual.adoc: line 25: callout list item index: expected 2 got 3
Following file should be created:
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">
    <file name="C:\*****\example-manual.adoc">
        <error line="17" message="list item index: expected 2, got 1." severity="warning" source="***"></error>
        <error line="25" message="callout list item index: expected 2 got 3" severity="warning" source="***"></error>
    </file>
</checkstyle>

With the appropriate plugin in Jenkins you get some dashboard (graphs representing the warning evolution over the time, list of new warnings introduced with the latest build, warning presented on the file, ...)

Here some screenshot produced:






Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor warnings as XML file

mojavelinux
Administrator
I'd say this absolutely fits as part of the logging issue. The only reason we have messages going to straight to stdout is because, in the early days, we were mimicking what AsciiDoc Python was doing. That decision was made long before we had an API. Obviously, it makes a ton more sense to be pushing these messages through a message facility so that we can extract them in various formats or fail fast.

Please do link this information to #44 as it will help drive the requirements.

Cheers,

-Dan

On Mon, Mar 21, 2016 at 2:57 PM, Jeremie Bresson [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Maybe this is related to the "Logger Framework" mentioned in this thread (and issue #44) but I am wondering if someone has already produced an XML file containing all the warning/error found by Asciidoctor.

A long time ago I did some experiment with the output format produced by the Checkstyle library:
(I have found this article: "How to Transform the Results from Findbugs, Checkstyle and PMD to HTML Report with XSLT 2.0 and Java?" that provide an example of the XML format.)

The big advantage is that if you produce a file like this (instead of the plain text description in the Log) you can integrate it with other Tools. In my case I did some experiments with the Checkstyle plugin for Jenkins.

As an example, instead of producing those logs:
asciidoctor: WARNING: example-manual.adoc: line 17: list item index: expected 2, got 1
asciidoctor: WARNING: example-manual.adoc: line 25: callout list item index: expected 2 got 3
Following file should be created:
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="5.0">
    <file name="C:\*****\example-manual.adoc">
        <error line="17" message="list item index: expected 2, got 1." severity="warning" source="***"></error>
        <error line="25" message="callout list item index: expected 2 got 3" severity="warning" source="***"></error>
    </file>
</checkstyle>

With the appropriate plugin in Jenkins you get some dashboard (graphs representing the warning evolution over the time, list of new warnings introduced with the latest build, warning presented on the file, ...)


--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor warnings as XML file

Jeremie Bresson
In reply to this post by Jeremie Bresson
At the end of my talk at DevoxxFr 2016, I got one question about the feedback you get when the includes are broken...

Right now you need to scroll the asciidoctor build logs. I think there is really a need for the feature discussed here. This would help with the maintenance of the documentation.
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor warnings as XML file

mojavelinux
Administrator
Agreed. It's something I'm going to be working on over the next few months. Expect some activity.

Cheers,

-Dan

On Tue, May 10, 2016 at 10:03 PM, Jeremie Bresson [via Asciidoctor :: Discussion] <[hidden email]> wrote:
At the end of my talk at DevoxxFr 2016, I got one question about the feedback you get when the includes are broken...

Right now you need to scroll the asciidoctor build logs. I think there is really a need for the feature discussed here. This would help with the maintenance of the documentation.



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-warnings-as-XML-file-tp4532p4663.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor warnings as XML file

Jeremie Bresson
I would be happy to help, if you have something in my domain of competence (Testing, Java).
Reply | Threaded
Open this post in threaded view
|

Re: Asciidoctor warnings as XML file

mojavelinux
Administrator
I'd love to have your help. When I get started on it, I'll be working in the normal way, though issues in the GitHub project. Stay tuned.

Cheers,

-Dan

On Wed, May 11, 2016 at 10:41 AM, Jeremie Bresson [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I would be happy to help, if you have something in my domain of competence (Testing, Java).


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Asciidoctor-warnings-as-XML-file-tp4532p4665.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen