[ checkstyle-Bugs-3434082 ] IllegalTokenText does not match anything besides .* format

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ checkstyle-Bugs-3434082 ] IllegalTokenText does not match anything besides .* format

SourceForge.net
Bugs item #3434082, was opened at 2011-11-06 05:34
Message generated for change (Comment added) made by o_sukhodolsky
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397078&aid=3434082&group_id=29721

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
>Resolution: Invalid
Priority: 3
Private: No
Submitted By: Edwin Stang (subes)
>Assigned to: Oleg Sukhodolsky (o_sukhodolsky)
Summary: IllegalTokenText does not match anything besides .* format

Initial Comment:
I cannot get the IllegalTokenText to match any format besides .* on PARAMETERS or PARAMETER_DEF.

<module name="IllegalTokenText">
    <property name="tokens" value="PARAMETER_DEF"/>
    <property name="format" value="@NotNull"/>
    <property name="message" value="Use @Nonnull instead of @NotNull on parameters."/>
</module>

The format ".*" matches the whole paramter definition "@NotNull final String[] args". But trying to match anything else fails miserably.

The format ".*[a-zA-Z].*" correctly matches everything, but somehow the format "a" does that aswell, even if I remove all a-literals from the paramters text. And then again the format "o" does not match anything...

----------------------------------------------------------------------

>Comment By: Oleg Sukhodolsky (o_sukhodolsky)
Date: 2011-12-01 11:35

Message:
the text for PARAMETER_DEF is "PARAMETER_DEF" :) not  the real declaration
as you expect :(
Thus the check works as expected (by its author) and I'm closing the ticket
as "invalid"

----------------------------------------------------------------------

Comment By: Edwin Stang (subes)
Date: 2011-11-06 07:42

Message:
This is because IllegalTokenText checks against the string "PARAMETER_DEF"
instead of "@NotNull final String[] args" as I expected. Maybe this should
be made more clear in the documentation. Or the check could be enhanced to
do just that. :)

----------------------------------------------------------------------

Comment By: Edwin Stang (subes)
Date: 2011-11-06 07:32

Message:
Ok, seems like I overestimated the usefulness of IllegalTokenTextCheck. I
had to write my own check to fullfill what I needed. See attachment.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397078&aid=3434082&group_id=29721

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Checkstyle-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-devel