Page 1 of 1

preventing common mistakes

PostPosted: Mon Dec 16, 2013 5:17 am
by kobi7
Hi, here is another suggestion, perhaps for the future
Mono has a tool called Gendarme. really nice.
it decompiles libraries and checks code for common errors.
some (imo) are bogus, but most are beneficial.

perhaps looking into those common mistakes, and trying to prevent their introduction in the first place when coding in cobra would be a good idea.
in other words, when you program in cobra, you don't get yourself into a mess or complications... removing the expertise parts and focusing on productivity.

just an idea.. are you acquainted with this tool, charles?

Re: preventing common mistakes

PostPosted: Mon Dec 16, 2013 9:57 am
by Charles
I took the liberty of editing your subject from "another suggestion" to "preventing common mistakes". Descriptive subjects make the forums easier to browse.

I had heard of Gendarme, but hadn't used it. Microsoft has a similar tool called FxCop. These are called "lint-like" tools after their ancestor "lint" which worked (works?) on C source code.

Here is a list of static analysis tools for .NET: ... lysis#.NET

Historically, I have had a bad impression of such tools as they often moan about things that aren't problematic. Microsoft's ASP.NET MVC code is full of attributes instructing FxCop not to complain about this and that.

But if you see something that you think Cobra could and should catch, just present it here on the forums as a specific suggestion and I'll be happy to consider it.

Another related thing we talked about in the past was a report that would score methods based on their complexity vs. their quality control (contracts and unit tests), and display the list sorted by greatest risk. In other words, a complex method with no contracts or unit tests would bubble up to the top. A small method with both would be listed last.

Re: preventing common mistakes

PostPosted: Tue Dec 17, 2013 3:02 am
by kobi7
i had a bad impression of fxcop too,
but gendarme was quite nice. it's not about conforming to guidelines but actual correctness and possible problems.
it also has a cyclomatic complexity rule, which is similar to what you want.

thanks for editing the subject, sometimes my imagination runs dry :-)