Re: RE : Checking a method call

"Oliver Burn" <[email protected]> Wed, 17 Sep 2008 07:57:31 +1000
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <[email protected]>
I have seen people use 1 + 1 + 1 to avoid using the number 3. :-)

People do amazing things to work around problems^H^H^H^H^H^H^H Checkstyle.

On Wed, Sep 17, 2008 at 00:56, Lars Kühne <[email protected]>wrote:

> Hey, I can work around those checks as well: "7      ".length() :-)
>
>
> On Tue, Sep 16, 2008 at 2:48 AM, Oliver Burn <[email protected]>wrote:
>
>> Yes, I do something similar as well. Here is an example:
>>
>>     <module name="GenericIllegalRegexp">
>>       <property name="format"
>> value="(Double|Float|Integer|Long)\s*\.\s*valueOf\s*\(\s*[01]\s*\)"/>
>>       <property name="message" value="Use NumberUtils.xxx_ZERO or
>> NumberUtils.xxx_ONE"/>
>>     </module>
>>
>>     <module name="GenericIllegalRegexp">
>>       <property name="format"
>> value="(Double|Float|Integer|Long)\s*\.\s*valueOf\s*\(\s*&quot;"/>
>>       <property name="message" value="Do not supply a string to be parsed,
>> you know the number."/>
>>     </module>
>>
>>     <module name="GenericIllegalRegexp">
>>       <property name="format"
>> value="\.\s*parse(Double|Float|Int|Long)\s*\(\s*&quot;"/>
>>       <property name="message" value="Do not avoid magic numbers this
>> way!"/>
>>     </module>
>>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Checkstyle-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/checkstyle-user
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________
Checkstyle-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user