[Mono-list] [ANN] Smokey

Jesse Jones jesjones at mindspring.com
Thu Aug 30 05:25:59 EDT 2007

Smokey is a command line tool used to analyze assemblies and report  
problems. Problems include buggy code (e.g. infinite recursion, null  
deref, malformed format string), performance issues (e.g. string  
concatenation in loops, excessive boxing, large structs), violations  
of the .NET design guidelines (e.g. inheriting from  
ApplicationException or ICloneable, naming, and swallowing  
exceptions), and miscellaneous rules like misspelled words in string  

You can download Smokey from the web site: <https://home.comcast.net/ 
~jesse98/public/Smokey>. The web site also has an html report for one  
of the System assemblies and a list of all of Smokey's rules.

Changes from Smokey
* Added nine new rules:
     - DllImportExtension, no extensions in DllImport.
     - DllImportPath, no paths in DllImport.
     - FlagsUseNone, flags enum should use "None" for the zero value.
     - LargeNamespace, namespace has more than 40 public types.
     - PluralEnumFlags, flags enum should end with s, i, or ae.
     - StaticSetter, non-private static method sets a field and is  
called from a thread.
     - ToStringOnString, ToString is called on a string (from lukasz).
     - UseDefaultInit, don't set fields to 0 in a ctor.
     - WeakIdentityLock, don't lock objects with weak identity.
* Added support for custom rules complete with an example which has  
three rules.
* Smokey.exe is now strongly named.
* Reports can now be generated in html format.
* StringSpellingRule ignores all words inside angle bracket markup,  
not just URLs.

   -- Jesse

More information about the Mono-list mailing list