History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CIB-1101
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Dale Peakall
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Pulse

XML Post Processor

Created: 01/Jun/07 02:04 PM   Updated: 11/Dec/08 05:48 AM
Component/s: Build core
Affects Version/s: 1.2.26
Fix Version/s: x.x


 Description  « Hide
Many utilities output their processing results as XML files (e.g. Checkstyle, FindBugs). It would be useful if there was a post-processor that allowed these files to be handled in a better manner than is possible with the regex post processor.

The post-processor could be configured using XPath expressions to both identify errors and warnings in the XML file and format a summary message indicating the problem.

e.g. to process:

<checkstyle version="4.1">
  <file name="/data/pulse/data/recipes/1802308/base/cart/src/main/java/org/acme/epv/cart/CartUnavailableException.java">
    <error line="16" column="5" severity="warning" message="Missing a Javadoc comment."
      source="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck"/>
  </file>
  <file name="/data/pulse/data/recipes/1802308/base/cart/src/main/java/org/acme/epv/cart/ShoppingCartService.java">
  </file>
  <file name="/data/pulse/data/recipes/1802308/base/cart/src/main/java/org/acme/epv/cart/ShoppingCartException.java">
  </file>
</checkstyle>

You could use something like:

<xml.pp>
  <xpath category="warning"
    select="//file/error[@severity='warning']"
    summary="[Checkstyle] \${../@name} \${@line}:\${@column} - \${@message}"/>
</xml.pp>

To provide output of:
[Checkstyle] /data/pulse/data/recipes/1802308/base/cart/src/main/java/org/acme/epv/cart/CartUnavailableException.java 16:5 - Missing a Javadoc comment.


 All   Comments   Change History      Sort Order:
jason - 01/Jun/07 03:07 PM
Hi Dale,

This is a really good idea, in the same spirit as the regex post-processor which allows customisation with minimal effort. It is worth noting that in 2.0 you will be able to plug in arbitrary post-processors. Even so, once we have 2.0 sorted it would be good to add a generic xpath-powered processor so that for simple cases dropping into plugins is not necessary.

Daniel Ostermeier - 11/Dec/08 05:48 AM
Trying to clean things up a little. We currently have a couple of very large buckets of tasks that are really not indications of our scheduling. What I am doing is for starters, moving all of the 2.x. items into x.x to indicate that they have not been scheduled. We can later go through these and pick up with ones that we intend to complete for an upcoming release.