Re: [Codenarc-user] can I change the compiler phase my rule runs in?
Brought to you by:
chrismair
From: Hamlet D'A. <ham...@gm...> - 2010-10-22 18:39:14
|
I am quite sure it is hardcoded as well. That's what I saw in the code :) Can we make it an optional property on AbstractAstVisitorRule, like this: class CouldReturnZeroLengthArrayRule extends AbstractAstVisitorRule { String name = 'CouldReturnZeroLengthArray' int priority = 2 Class astVisitorClass = CouldReturnZeroLengthArrayAstVisitor CompilePhase phase = CompilePhase.CLASS_GENERATION } I could take a look at adding this feature if you want, but I'd rather concentrate on writing new rules. Can you handle this? -- Hamlet D'Arcy ham...@gm... On Fri, Oct 22, 2010 at 1:24 PM, <chr...@wa...> wrote: > > Hmmm. Not currently. That is hard-coded right now, I think. I'll take a > look. > > > > *"Hamlet D'Arcy" <ham...@gm...>* > > 10/22/2010 02:11 PM > To > Cod...@li... > cc > Subject > [Codenarc-user] can I change the compiler phase my rule runs in? > > > > > can I change the compiler phase my rule runs in? > > I need to see ReturnStatement objects and those are only present in > the Class Generation phase. > > Can I make my rule run in that phase? > > -- > Hamlet D'Arcy > ham...@gm... > > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America > contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in > marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Codenarc-user mailing list > Cod...@li... > https://lists.sourceforge.net/lists/listinfo/codenarc-user > > ForwardSourceID:NT000CCCDE > |