26 Oct 2004 jluke   » (Master)

I was always jealous of FxCop, the more automated tools the better I say. That was one of the things I wanted to get working on MonoDevelop a few months ago. You see, SharpDevelop wrote this AssemblyAnalyzer thing that works sort of in the same way. At the time, I hadn't quite finished the GUI portion of the AddIn so its not enabled in MonoDevelop.

However, I thought why not just slap a little command-line driver in front of it and then everyone can use it. So that is what I did. Temporarily called monocop (because AssemblyAnalyzer was too long, and I haven't bothered to think of a real name yet). It can output either plain text or xml. It should work with make, nant, others fairly well in an automatable way.

It works like this. You specify an assembly or assemblies to analyze, and it will warn you of possible design and naming problems. It also supports custom rules and looks to be fairly easy to add more. It only has about 87 rules right now.

Some example output: $ monocop -xml -output:results.xml hello.exe

<?xml version="1.0" encoding="utf-8"?> <Assembly Path="hello.exe"> <Resolution Certainty="95" Priority="Error"> <Item>/home/jluke/hello.exe</Item> <Description>Assemblies should be strong named</Description> <Details>Assemblies with a strong name can be placed in the GAC. Furthermore only strong named assemblies can be referenced by a strong named assembly (Your assembly cannot be used by a strong named assembly if you do not sign it).</Details> <Text>Sign the assembly hello.exe with a strong name.</Text> </Resolution> ....

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!