Bug 47715

Summary: filterchain-based validation identifies line numbers
Product: Ant Reporter: David Hausladen <david_hausladen>
Component: CoreAssignee: Ant Notifications List <notifications>
Status: NEW ---    
Severity: enhancement    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Sample build file fragment showing possible use of new capability

Description David Hausladen 2009-08-20 10:01:09 UTC
When ant filterchains are used to validate files, the validation errors can not supply line numbers.  Enhance PrefixLines filter to support such a capability or add new PrefixLineNumbers filter.

I would suggest that the user be required to provide the padding size for the line numbers or padding be ignored altogether (the benefit of padding is to have all line numbers consume the same number of characters at the beginning of the line).

**Specific use case**

Our build does RegEx-based validation of source files looking for forbidden code constructs.  The RegEx is used to identify all source files containing the forbidden code constructs, and for each identified source file, it generates an error and shows the offending lines.  Unfortunately, we're unable to display the line number for the offending lines.

**Related enhancements**

5748 seems related, but the thin details leave one wondering how the tokens were expected to be used.
Comment 1 David Hausladen 2009-08-20 10:06:52 UTC
Created attachment 24154 [details]
Sample build file fragment showing possible use of new capability