[Mono-list] FxCop?

Jeroen Janssen japj@xs4all.nl
Mon, 03 Feb 2003 23:04:54 +0100


Miguel de Icaza wrote:

>Hello,
>
>  
>
>>* Assemblies are marked CLSCompliant ('Mono.PEToolkit' should have the 
>>CLSCompliantAttribute, and its value should be true.)
>>    
>>
>
>We want this.
>
For all assemblies?

>>* Assemblies have version numbers (Add an AssemblyVersion attribute to 
>>the 'Mono.PEToolkit' assembly.)
>>    
>>
>
>We should add, something that matches the MS versions possibly.
>  
>
Ok, that means someone has to dig out the MS version numbers (any 
volunteers?).

What about 'mono' assemblies (things that don't are available from MS)? 
(nicest things would be to have configure create it based on some 
setting I think).
You could go for "mono" version number (example: put 0.19 in the version 
for mono 0.19), or go for assembly specific version numberings.

At least for everything 'in' mcs/class I think it might be better to 
follow the mono version numbering.

>>* Exceptions do not extend System.Exception (Change 
>>'BadMetaDataException' to extend either ApplicationException or 
>>SystemException.)
>>    
>>
>
>Good for non-core assemblies.  For core assemblies (those that are
>compatible with Microsoft) we have not really any option.
>
Ok, maybe we should put an mono-FxCop-rule 'explanation' somewhere.
The 'rules' are different for core and non-core assemblies.

>>* Exceptions require multiple constructors (Add a constructor with a 
>>string parameter and exception parameter to custom exception 
>>'BadMetaDataException'. Add a protected constructor with a 
>>SerializationInfo object parameter and a StreamingContext object 
>>parameter to custom exception 'BadMetaDataException'.)
>>
>>* Exceptions are marked Serializable (Add a Serializable attribute to 
>>'BadMetaDataException'.)
>>    
>>
>
>We want both.
>  
>
Is this also the case for core assemblies?
(forgive me, but I don't know if the current core assemblies contain 
exceptions without following these two rules).
---
Jeroen Janssen