
| Key: |
CIB-1101
|
| Type: |
New Feature
|
| Status: |
Open
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Dale Peakall
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
Pulse
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
|
|
|
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.
|
|
Description
|
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.
|
Show » |
|
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.