Forums

preventing common mistakes

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

preventing common mistakes

Postby kobi7 » Mon Dec 16, 2013 5:17 am

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?
Falun Dafa is Good.
Truth, Compassion, Forbearance is Good.
kobi7
 
Posts: 82
Location: Israel

Re: preventing common mistakes

Postby Charles » Mon Dec 16, 2013 9:57 am

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:
http://en.wikipedia.org/wiki/List_of_to ... 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.
Charles
 
Posts: 2510
Location: Los Angeles, CA

Re: preventing common mistakes

Postby kobi7 » Tue Dec 17, 2013 3:02 am

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 :-)
Falun Dafa is Good.
Truth, Compassion, Forbearance is Good.
kobi7
 
Posts: 82
Location: Israel


Return to Discussion

Who is online

Users browsing this forum: No registered users and 8 guests

cron