[
http://jira.codehaus.org/browse/MTAGLIST-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=229014#action_229014
]
Nate Stoddard commented on MTAGLIST-51:
---------------------------------------
This is an excellent find Bruno. Thanks for submitting the issue.
I looked into the code and the problem is related to the TagClass function
"tagMatchContains". As each line of text is read, this function is called for
every TagClass to determine if these is a tag on the line. The problem with
the function is that it is a "first match" design. When this function returns
a substring match, like the your examples, then later checks in the processing
sequence reject the match because the tag is part of a larger string.
The fix for this is to update the function to be a "best match" design. The
function should check all tags and return the tag with the best match for that
TagClass. In your example the @todo would be the best match because 5
characters are matched instead of only 4 for todo.
I put in some code together and this appears to solve the problem; however, the
code breaks the unit tests, so I will need to update them as well. I'll try to
have the patch submitted this weekend.
> Javadoc @todo,@deprecated are not recognised
> --------------------------------------------
>
> Key: MTAGLIST-51
> URL: http://jira.codehaus.org/browse/MTAGLIST-51
> Project: Maven 2.x Taglist Plugin
> Issue Type: Bug
> Affects Versions: 2.4
> Environment: win xp, maven 2.1.1
> Reporter: Bruno Marti
>
> Javadoc comments of @todo and @deprecated are not recognised, even if there
> are defined in the taglist.
> {noformat}
> /**
> * my comment
> *
> * @todo write something
> * @deprecated use other
> *
> ...
> {noformat}
> {noformat}
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>taglist-maven-plugin</artifactId>
> <version>2.4</version>
> <configuration>
> <tagListOptions>
> <tagClasses>
> <tagClass>
> <displayName>Todo Work</displayName>
> <tags>
> <tag>
> <matchString>todo</matchString>
> <matchType>ignoreCase</matchType>
> </tag>
> <tag>
> <matchString>@todo</matchString>
> <matchType>ignoreCase</matchType>
> </tag>
> <tag>
> <matchString>FIXME</matchString>
> <matchType>exact</matchType>
> </tag>
> </tags>
> </tagClass>
> <tagClass>
> <displayName>Deprecated</displayName>
> <tags>
> <tag>
> <matchString>deprecated</matchString>
> <matchType>ignoreCase</matchType>
> </tag>
> <tag>
> <matchString>@deprecated</matchString>
> <matchType>ignoreCase</matchType>
> </tag>
> </tags>
> </tagClass>
> </tagClasses>
> </tagListOptions>
> </configuration>
> </plugin>
> {noformat}
--
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