Hi Ken,

I changed the regexp to: 
https://github.com/jenkinsci/warnings-plugin/commit/076da03e4afbcf0ace433f6420c7f417c94049fd

Now the parser handles both formats. Will be part of the next warnings release… 

Thanks, Ulli

Am 15.05.2013 um 15:53 schrieb Ken Overly <[email protected]>:

> Ulli,
> I agree it would be best if they could be merged into the same parser.  I'm 
> just not that good with regex to figure how to merge the two.  The 
> differences are the 1) the use of quotes around the filename, 2) comma 
> between filename and line number, and 3) colon between linenumber and warning 
> level.
> 
> Here are the regex strings for the original IarParser and the new one that I 
> wrote.
> 
> IarParser:
>     private static final String IAR_WARNING_PATTERN =
>         "^\"(.*?)\",(\\d+)\\s+(" + ERROR + OR + REMARK + OR + WARNING + OR + 
> FATAL_ERROR + ")\\[(\\w+)\\]: (.*)$";
> 
> 
> Mine:
>     private static final String IAR_WARNING_PATTERN =
>         "^(.*?)\\((\\d+)\\)\\s+: (" + ERROR + OR + REMARK + OR + WARNING + OR 
> + FATAL_ERROR + ")\\[(\\w+)\\]: (.*)$";
> 
> 
> Here are the format of the compiler warnings for each:
> 
> IarParser:  (deduced from a comment in a previous version of the parser)
> "filename",linenumber level[tag]: message 
> 
> Mine:
> filename(linenumber) : level[tag]: message 
> 
> Lastly, here is a sample of the compiler output:
> C:\dev\bsc\daqtask.c(43) : Warning[Pe177]: variable "pgMsgEnv" was declared 
> but never referenced
> 
> Thanks for your help!
> 
> -Ken
> 
> 
> 
> On Tue, May 14, 2013 at 3:58 PM, Ulli Hafner <[email protected]> wrote:
> How large are the differences between the two warning formats? If they are 
> small I would prefer having just a single parser. This make things easer for 
> the user, because there is just one selection possible for IAR. Maybe we can 
> combine the 2 expressions into one that matches both.
> 
> Otherwise we can add your new parser (with a new name) to the warnings 
> plug-in using the steps described by Baptiste.
> 
> In both cases it would be good to have a small unit test that verifies that 
> the parsers works: you can have a look at the existing ones, shouldn't be 
> hard to write a new one. Let me know if you need more details or help for the 
> implementation...
> 
> Ulli
> 
> 
> Am 14.05.2013 um 17:40 schrieb Baptiste Mathus <[email protected]>:
> 
>> Hi,
>> You're on the right track :).
>> 
>> Here's the typical way/steps to proceed: 
>> * find or create the corresponding issue in JIRA for reference
>> * "fork" the plugin in your github account (if not already done)
>> * clone it locally (if not done)
>> * create a dedicated branch 
>> * Create a commit in that branch containing your fix
>> * push that branch on your github fork
>> * create a "pull request" for that branch
>> * reference that PR in the JIRA issue
>> 
>> Hth,might seem complex but many steps are actually quite simple.
>> 
>> Cheers
>> 
>> Le 14 mai 2013 16:40, "Ken O" <[email protected]> a écrit :
>> I'm making my first foray into Jenkins development by adding another parser 
>> for the warnings plugin.  I've found the compiler warnings emitted from my 
>> version of the IAR compiler (EWARM v6.3) are not parsed properly by the 
>> existing IAR warnings plugin.
>> 
>> I've created another version of the IAR plugin by copying the existing one 
>> and modifying the regex.  Is that the correct approach?  I considered the 
>> possibility of modifying the existing parser to handle multiple regex 
>> patterns but that was a little above my present level.  I've been an 
>> embedded developer for a long time.  Java dev and github is fairly new to me.
>> 
>> I have the parser working - except for implementing a test case for the new 
>> parser.
>> 
>> Any guidance would be helpful.
>> 
>> Thanks to Ulli for maintaining an excellent plugin!
>> 
>> -Ken
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Jenkins Developers" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/jenkinsci-dev/RWCbH1DEe34/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to