[Mono-dev] Mono.Posix.dll and FxCop
jonpryor at vt.edu
Tue Sep 13 18:43:26 EDT 2005
I recently ran FxCop  over Mono.Posix.dll to check for class
library guideline adherence. As could be expected, there were
several thousand issues found (2627 to be exact; the complete FxCop
error report is attached).
Many of these are not reasonable to follow in Mono.Posix.dll, such as
PascalCased members (deliberately ignored for Mono.Unix.Syscall,
Mono.Unix.Stdlib, and every enumeration that needs to interop with
unmanaged code). Others I'm not so sure about, and thus would like
a second opinion.
In short, should we care about FxCop violations at all in
Mono.Posix.dll (and potentially other Mono-native assemblies)?
If so, which issues?
The short list of potentially controversial FxCop issues in
Mono.Posix.dll is this:
- Anything implementing IDisposable should derive from
System.MarshalByRefObject. This is for remoting situations
(e.g. across AppDomains).
Impacts FilePosition, UnixClient, UnixListener.
- [Flags]-attributed enums should be plural. Impacts AccessMode
and MmapProt. I'm inclined to make such a change by [Obsoleting]
the previous enums and Syscall methods, allowing people a few
months to migrate before removing them in 1.2 final.
- UnixGroupInfo.Members -- properties shouldn't return arrays, as
apparently it's inefficient. Is this something to worry about?
If so, should I replace the Members property with a GetMembers()
- (Most controversial, probably) Should Mono.Unix.Error be renamed
to Mono.Unix.Errno? Error is apparently a reserved word which
shouldn't be used for CLS compatibility.
Keep in mind that while some of these are potentially breaking
changes, the Mono.Unix API is deliberately unstable (until 1.2) for
precisely this reason, as things may need to change for consistency.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mono.Posix FxCop Violations.xml.gz
Size: 42718 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050913/4b9c6a0b/attachment.gz
More information about the Mono-devel-list