Gendarme Tasks. Weekly Status Report #10

August 6, 2007

This is the status report for July 30 - August 5.

Accomplished this week.

Well, after the review process, Alan suggested me that 10 is a big number for a long parameter list. Chris also suggested me if there are any way for change values for the rules without recompile.

Then I presented a solution and I wrote a patch for allow put some parameter in the gendarme file config. Then, with the patch you can specify some parameters for each ruleset, I like the results and the patch is pending for review.

I also finished the Avoid Unused Parameters rule. Alan suggested this rule in the list, and I liked it. This is because, sometimes, refactoring and removing some parameters, accidentally, I forgot remove the parameter from the method signature. This rule will check that you use all parameters in the signature.

Plans for the next week.

Well, for the next week I have some ideas. The first will be implement the message chain smell. This smell happens when you make a lot of chained calls. By example:

Foo anObject = new Foo ();
anObject.Bar.ApplyBaz (otherObject).MakeStuff ().Handle ().ToBar ();

There are a lot of calls in this line, and you can read more about it in this link. Chris has written some code for detect this chains, and I can reuse it.

There are other options, by example Detect long classes. This smell a bit complex to detect, but I believe I can do it. And with this smell, I have finished my 4 comples smells, and I can continue with others (Shotgun surgery, feature envy ...)

Challenges or Problems.

Nothing special, there was a problem detecting unused parameters. Specially with static methods, but I have fixed it and the rule will be reviewed.

Other challenge was, read, understand and modify the gendarme code; but the code is really clear and I like it. I really enjoyed a lot writting the patch.

Interesting resources.

Well, I have written a link some lines before. You can check it here is another taxonomy for bad smells.

Finally I want thank, all people that helped me, with ideas, with revisions or with other help. Specially my mentor, Sebastien, and Alan, and Chris and JB Evain for the corrections and advices in the IRC.

Discussion