[Mono-dev] Changes to Gendarme framework

Sebastien Pouliot sebastien.pouliot at gmail.com
Wed Dec 14 07:54:52 EST 2005

Hello Aaron,

On Tue, 2005-12-13 at 13:59 -0800, Aaron Tomb wrote:
> Hi,
> I'm almost finished rolling my rules into Gendarme, but I'm finding that
> I need a little more support from the rule execution framework. There
> are two major changes I'd like to make:
> 1) The null dereference analysis doesn't simply succeed or fail --- it
> generates a list of locations where operations may fail. Therefore,
> rather than having the various Check*() methods from IRule return bool,
> I'd like to have them either return a list of messages (my preference)
> or take a reporter object of some sort as a parameter. In the former
> case, returning null (or an empty list?) would indicate success (i.e.,
> no errors).

Good idea. I also prefer the methods to return a RuleCollection (or an
empty static instance if there's nothing "wrong").

> 2) It's nice to be able to generate debugging output with a simple
> command-line flag, rather than including debugging code during
> development and removing it later. So, I'd like to add a --debug flag to
> the console runner. However, in order for the rules to know about this
> flag (or any other), it either needs to be some sort of static global
> (icky) or we need to pass the runner (or some portion of it) into the
> rules when we execute them. I perfer the latter option, myself, as it
> might come in handy in a number of other ways later.

I could I used it many time so it makes a lot of sense.

> I ask about these in advance because they both change the interface that
> all of the rules use, so they'll require modification of all existing
> rules (in trivial ways). Fortunately, at this point, we have very few
> rules, so it shouldn't be hard.

Both true ;-)

> If all of this sounds good, I'll send in a patch shortly.


Sebastien Pouliot
email: sebastien at ximian.com
blog: http://pages.infinit.net/ctech/

More information about the Mono-devel-list mailing list