[Mono-dev] MoMA 1.1 - analysing "MoMA.Analyzer.dll"
jonpryor at vt.edu
Wed Dec 20 20:54:32 EST 2006
On Mon, 2006-12-18 at 10:28 +0000, Miguel Sousa Filipe wrote:
> this is a bit off-topic but I think its worthy of mentioning.
> running MoMA on the MoMA's "MoMA.Analyzer.dll" will report that there
> are problems in that dll:
> 1- Not implemented exception
> 1- MonoTodo.
> isn't that a bug?
No, it's a limitation of static analysis.
Consider the following code fragment:
if (Path.DirectorySeparatorChar == '\\')
MoMA isn't going to evaluate the call -- that's what the runtime is
for, evaluating/executing IL -- all MoMA will see is CallWin32Method(),
which it will warn about. You, as the developer, will have to inspect
the code, realize that it's already handling platform differences, and
then ignore the warning.
(Certainly MoMA could be enhanced to recognized switching on
Path.DirectorySeparatorChar, but there are other techniques for platform
detection, and/or it could be nested within a method call... There's
only so much you can do without executing the IL.)
More information about the Mono-devel-list