Hello Lex,
Thanks for bringing this up the mailing-list.
I think the rule has potential since I had a similar idea a while
ago ;-) What stopped me earlier was a feeling that it would bring a
lot of defects, quite a few of them not very important. For example:
a) in Gendarme most rules do not have any state so the best "ToString"
is still, IMO, the type name. That could be fixed easily by skipping
types without any fields (since most interesting properties will have
a, manual or automatic, backing field).
b) Abstract types do not really need a ToString since it won't be used
(assuming all inheritors provide their own). Now this does not play
well with (a) because the abstract type could have fields where the
concrete have none (not a very big issue and a parent-check could be
done too);
c) Bevan's comment about [DebuggerDisplay] is another case (but again
not perfect considering non-VS.NET users ;-)
I don't have more ideas right now but I'd be happy if those suggestion
(more feedback welcome) could be added to the rule. I think that would
make it something I like to fix for Gendarme.
Sebastien
p.s. one last thing let's move the rule from .Design
to .Maintainability
On Nov 18, 8:27 am, Lex Li <
lextu...@gmail.com> wrote:
> Hi guys,
>
> I have been using this custom rule for my open source projects for a few
> months, and started to maintain it in a fork after Mono moved to GitHub.
>
>
https://github.com/lextm/mono-tools/commit/261ec39bb6d1ac72da7bb1d349...
>
> Like spouliot commented, this rule is still far from mature. Any feedback is
> welcome.
>
> Thanks,
>
> Lex Lihttp://
www.lextm.com