[ 
http://jira.codehaus.org/browse/MTAGLIST-22?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joerg Schaible reopened MTAGLIST-22:
------------------------------------


I'll reopen this issue, because the regex support that has been added does not 
produce any useful result for my case. It seems that in the current 
implementation the regex matches only a word and I cannot define the position 
of the tag's comment for the report.

In my proposal the regular expression had to match the complete line and 
defined a capturing group for the comment. The goal is to get a useful report 
over missing documentation (tags have been added by formatting tools) like in:

{code:java}
/**
 * A method's description.
 *
 * @param foo the foo param
 * @param bar DOCUMENT_ME
 * @throws IllegalArgumentException DOCUMENT_ME
 */
void aMethod(int foo, int bar) {
...
{code}

If I define DOCUMENT_ME as tag (with regEx or exact) the report will contain 
for each found tag simply "-- No comment --" which is quite useless. With my 
proposal I'd have "@param bar" for the first tag location and "@throws 
IllegalArgumentException" for the second.

> Regular expression support for tags
> -----------------------------------
>
>                 Key: MTAGLIST-22
>                 URL: http://jira.codehaus.org/browse/MTAGLIST-22
>             Project: Maven 2.x Taglist Plugin
>          Issue Type: New Feature
>    Affects Versions: 2.1
>            Reporter: Joerg Schaible
>            Assignee: David J. M. Karlsen
>             Fix For: 2.4
>
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> Background: Modern IDEs offer code templates for new files or new methods. 
> Also some code formatters add automatically template-based javadoc comments. 
> Typically such templates use tags as placeholders for the real description 
> which are located at the end of the line. Enhancing the standard tag 
> detection to support EOL tags might trigger too many false positives, 
> especially if the tag comment has to be extracted too.
> Therefore this proposal is about the support of an extension to the 
> configuration to support tags defined as regular expression:
> {code:xml}
> <regexpTags>
>     <regexpTag>\\* (.*)DOCUMENT_ME$<regexpTag>
> <regexpTags>
> {code}
> The algorithm should match the regexp against each line. The first match of 
> the line is the hit and the first group defines the text of the tag. In this 
> situation you will avoid false positives for the standard tags and users like 
> me can define advanced search patterns.
> Background of this issue are the comments at MTAGLIST-17, see the attachment 
> there for code with such tags.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to