Re: RE : Checking a method call
"Lars Kühne" <[email protected]> Tue, 16 Sep 2008 16:56:55 +0200
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <[email protected]> |
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*""/> > <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*""/> > <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