MonoDevelop addin ideas

6 views
Skip to first unread message

Ben Motmans

unread,
Jan 31, 2008, 4:40:48 PM1/31/08
to Gendarme
Hey guys,

I have some ideas for several improvements to the monodevelop gendarme
addin

* Split into several addins
MonoDevelop.CodeAnalysis
MonoDevelop.CodeAnalysis.Gendarme

Gendarme isn't the only code analysis tool around, so in the future MD
might want to support multiple code analysis tools, for example:
FxCop (when the windows port of monodevelop is finished)
Smokey (http://lists.ximian.com/pipermail/mono-devel-list/2007-
September/025033.html)
...

* MonoDevelop.CodeAnalysis
this assembly should contain all shared objects/widgets

*** CodeAnalysisView: a view showing all the results, with filters;
this includes support to ignore specific results and to jump directly
to the complete description of the rule

*** Project support: an extension to the monodevelop project file
format, which allows to store a list of rules inside the project, this
would be linked to the project properties (for example: a Gtk.TreeView
where all the rules are divided into categories, and you can enable/
disable the rules using a checkbox in the treeview)

*** Gui extensions: add an "Analyze Assembly" menu item to the main
menu (project submenu) and the solution pad context menu

*** Abstraction: create an abstraction layer for a "Rule",
"RuleGroup" and "ICodeAnalyzer", this allows the re-use of the project
support and analysis view for all code analysis tools

*** AddinCatalog: MD translation support for extra addins

* MonoDevelop.CodeAnalysis.Gendarme
All gendarme specific code (implementation of the abstract layer)

* the obvious stuff: integration into the MD build process, makefiles,
(an online repisitory containing a pre-build version of the addin, so
people can install it using the addin manager), ...

I have no idea to what extend these features are implemented/planned
right now, the last version i can find only supported MD 0.13

so ... 2 things:
* please let me know what you think of these ideas
* i'm willing to help on the addin if needed, let me know where and
when help is required, and i'll do my best to help out :)

Sebastien Pouliot

unread,
Jan 31, 2008, 6:13:04 PM1/31/08
to gend...@googlegroups.com
Hello Ben,

On Thu, 2008-01-31 at 13:40 -0800, Ben Motmans wrote:
> Hey guys,
>
> I have some ideas for several improvements to the monodevelop gendarme
> addin
>
> * Split into several addins
> MonoDevelop.CodeAnalysis
> MonoDevelop.CodeAnalysis.Gendarme
>
> Gendarme isn't the only code analysis tool around, so in the future MD
> might want to support multiple code analysis tools, for example:
> FxCop (when the windows port of monodevelop is finished)

I never looked at FxCop API so I'm not sure what it involves (or if it's
license makes this possible or not).

> Smokey (http://lists.ximian.com/pipermail/mono-devel-list/2007-
> September/025033.html)

You should talk to Dan (also on this list, "ex" on IRC). He made a
Smokey addin during GHOP.

> ...

Something else discussed last GSoC (but not done) was similar. The split
was (not) done to let the GUI and the MD stuff separate (but could still
be using Mono.Addin).

In that case the goal was to share code between the existing MD addin,
the GSoC SWF runner and a (potential) GTK# runner (i.e. without MD).

Maybe both approach could be merged, somehow ? I'd like to provide a GUI
runner to people using something else than MD and doing it "not from
scratch" has appeal :)

> * MonoDevelop.CodeAnalysis
> this assembly should contain all shared objects/widgets
>
> *** CodeAnalysisView: a view showing all the results, with filters;
> this includes support to ignore specific results

Ignore support is coming to the framework soon [1] but it can also be
done at the Runner level.

> and to jump directly to the complete description of the rule

That's the big seller :)

> *** Project support: an extension to the monodevelop project file
> format, which allows to store a list of rules inside the project, this
> would be linked to the project properties (for example: a Gtk.TreeView
> where all the rules are divided into categories, and you can enable/
> disable the rules using a checkbox in the treeview)

That would be incredibly useful :)

The file "rules.xml" should only be used by the console runner (as it
saves a lot a typing for command-line freaks like me ;-)

BTW the Gendarme.Rules.*.xml[.in] days will soon be over [1]

> *** Gui extensions: add an "Analyze Assembly" menu item to the main
> menu (project submenu) and the solution pad context menu

Something around the corner [1] will be being able to analyze assemblies
as a "set". This will be useful for projects that include several
assemblies since some rules (e.g. smells) can flags problems in assembly
X that wouldn't reported if the analysis has included assembly Y too.

E.g. Gendarme "self-test" will be analyzed using this

So maybe a "Analyze Solution" would be helpful too (with a
solution-level property to enable/disable "sets", at least if supported
by the code analysis engine).

> *** Abstraction: create an abstraction layer for a "Rule",
> "RuleGroup" and "ICodeAnalyzer", this allows the re-use of the project
> support and analysis view for all code analysis tools
>
> *** AddinCatalog: MD translation support for extra addins

I'm still unsure of how Gendarme itself will deal with translations. I
don't want satellite assemblies, nor do I want to add unmanaged
dependencies for people on Windows :(

Input welcome ???

> * MonoDevelop.CodeAnalysis.Gendarme
> All gendarme specific code (implementation of the abstract layer)
>
> * the obvious stuff: integration into the MD build process, makefiles,
> (an online repisitory containing a pre-build version of the addin, so
> people can install it using the addin manager), ...
>
> I have no idea to what extend these features are implemented/planned
> right now, the last version i can find only supported MD 0.13

I asked Eli (also on this list) if he could update his addin recently -
but I'm not sure of it's current status.

Two things for sure: Gendarme is more popular than ever (much thanks to
Google) and MonoDevelop is gathering a lot of attention with it's 1.0
release due soon :)

> so ... 2 things:
> * please let me know what you think of these ideas

I like them a lot :)

Another thing that was discussed (because I love it ;-) was the NUnit
addin history feature. This would be a nice (i.e. not essential) feature
to have. Being able to track progress (or distress) is something that I
like very much ;-)

> * i'm willing to help on the addin if needed, let me know where and
> when help is required, and i'll do my best to help out :)

I like that a lot too :-)


[1] February 11th week will be the next Novell "Hack Week" and there's a
list of things I intend to do (some already posted in this group, others
that will be soon, I "kind of" promise ;-)

Sebastien

Néstor Salceda

unread,
Feb 1, 2008, 7:57:23 PM2/1/08
to gend...@googlegroups.com
Hey,

On jue, 2008-01-31 at 18:13 -0500, Sebastien Pouliot wrote:

> [1] February 11th week will be the next Novell "Hack Week" and there's a
> list of things I intend to do (some already posted in this group, others
> that will be soon, I "kind of" promise ;-)

I will finish my exams on 6th, and I will be ready to return back with
contributions. I hope the 11th week, we will do a lot of stuff.

I really wish write more Gendarme code, rules and other tasks.

See you!

Néstor.

Exception

unread,
Feb 4, 2008, 2:19:30 PM2/4/08
to Gendarme
Hello.
I'm Dan and, like Sebastien already put it, I have written an add-in
for MonoDevelop to support Smokey (http://code.google.com/p/
smokeyaddin/). However, while implementing it I faced a major issue:
Smokey had no external APIs, and it was impossible to deal with it
unless to parse its output (what I was forced to do -- and this is the
very reason why this add-in is a bit slow: parsing XML output ain't
this fast as operating classes supplied by developers, add to this
having to wait for the Smokey process to finish).
The other thing I really dislike in my add-in is that it outputs
directly into Tasks pane because this was my very first attempt to
develop something for MonoDevelop, not to mention I have never ever
worked with Gtk#. So I decided to leave it as is and then suggest to
do the same thing (yet you were the first):

> * Split into several addins
> MonoDevelop.CodeAnalysis
> MonoDevelop.CodeAnalysis.Gendarme

adding MonoDevelop.CodeAnalysis.Smokey

We could reuse Gendarme add-in user interface with all its grouping
features etc, yet make it working with some basic classes, then
providing

implementations both for Smokey and Gendarme.

> *** Gui extensions: add an "Analyze Assembly" menu item to the main
> menu (project submenu) and the solution pad context menu

This is done in my Smokey add-in, if we decide to merge it with
Gendarme add-in and move common code into another assembly, we code
reuse my code for handling solutions/projects.

> *** Abstraction: create an abstraction layer for a "Rule",
> "RuleGroup" and "ICodeAnalyzer", this allows the re-use of the project
> support and analysis view for all code analysis tools

Exactly!

Who was developing the Gendarme add-in? I would very like to hear
feedback on this ideas, surely as you all do :-)
Reply all
Reply to author
Forward
0 new messages