[Mono-dev] Changes to Gendarme framework
Aaron Tomb
atomb at soe.ucsc.edu
Tue Dec 13 16:59:13 EST 2005
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).
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 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.
If all of this sounds good, I'll send in a patch shortly.
Aaron
More information about the Mono-devel-list
mailing list