No VB.NET Support

Mar 21, 2011 at 11:52 PM

I love the idea of StyleCop but is there any support for VB.NET or any other .NET programming language for that matter?

Developer
Mar 22, 2011 at 6:54 AM

StyleCop is for C# only for now.  This request (support language X Y or Z) come up now and then, but as an open source project, this would require enough interest from individual(s) who want to drive said feature set(s).  So far I don't think anyone has voiced interest in stepping up to the challenge.

Coordinator
Mar 22, 2011 at 10:11 AM

Right now it would need a VB.NET parser, and then the rule analyzers writing. I would estimate about 200 dev hrs of effort should get you through the parser. The analyzers: probably about 1-2 hrs per rule. You would probably arrive at 50-100 rules so thats another 50-200 hrs of effort.

Right now I don't have any teams using VB.NET so I dont need it.

Honestly, I think a SQL parser and ruleset would be next but having said that if anyone wants to start the VB.NET work I'm more than happy to ensure it gets integrated into the main build.

Mar 22, 2011 at 2:25 PM

A SQL parser would be extremely useful.  My team uses DB projects extensively, and having the ability to apply a common set of style guidelines to that code would be excellent.

Mar 22, 2011 at 2:48 PM

Well, I have some free-time so I might be able to give the VB support a shot. Just point me in the direction of parsing/etc and I'll be good to go.

Coordinator
Mar 22, 2011 at 3:25 PM
Download the stylecop sdk

You'll need to write a VbParser first (download the source and look at the c# parser)

Then you need to find some VB.NET coding standards. From these start to write your first analyzer for these VB.NET rules.

Some of the rules you would copy over from the c# rules i.e. NoBlankLinesAtEndOfFile etc.

A.
Mar 22, 2011 at 10:47 PM
Edited Mar 22, 2011 at 10:47 PM
andyr wrote:
Download the stylecop sdk

You'll need to write a VbParser first (download the source and look at the c# parser)

Then you need to find some VB.NET coding standards. From these start to write your first analyzer for these VB.NET rules.

Some of the rules you would copy over from the c# rules i.e. NoBlankLinesAtEndOfFile etc.

A.

Okay, I'll look into it but don't hold your breath. :(

Mar 23, 2011 at 8:49 AM
andyr wrote:
Download the stylecop sdk

You'll need to write a VbParser first (download the source and look at the c# parser)

Then you need to find some VB.NET coding standards. From these start to write your first analyzer for these VB.NET rules.

Some of the rules you would copy over from the c# rules i.e. NoBlankLinesAtEndOfFile etc.

A.

Also the no tab characters rule would copy as is!

Apr 12, 2011 at 11:31 AM

Amrykid,

I would interest in a VB Parser for Style cop, we have large application which be good to standardise the code.  I dont have much time in the next month but would interested in help out.

 

Iain

Apr 12, 2011 at 12:00 PM

I will love to have StyleCop also for VB.NET!

Apr 12, 2011 at 12:49 PM

Having VB.NET support for StyleCop would be outstanding.  It's disappointing switching between C# and VB projects and losing one of the tools I use all the time.

Apr 12, 2011 at 3:23 PM

I am currently working at a client where all development is in Vb.net and they are working on finding tools to help making the coding more consistent.  This is the third such client in the last three years that does this and so this would be a great addition.  StyleCop support is already included in their continuous integration tool, so it would be a great thing.

Coordinator
Apr 12, 2011 at 3:49 PM

I'll repeat my info from above for reference: Right now it would need a VB.NET parser, and then the rule analyzers writing. I would estimate about 200 dev hrs of effort should get you through the parser. The analyzers: probably about 1-2 hrs per rule. You would probably arrive at 50-100 rules so thats another 50-200 hrs of effort. If someone wants to start the docs on here tell you how to create a branch and start the dev work.

Apr 12, 2011 at 3:58 PM

As part of Project Rosylyn (Compiler as Service) in either v.next or v.next.next.  Being able to run the kind of analysis will not be dependent on the code type and will able to do analysis on the AST, rather on the code

Coordinator
Apr 12, 2011 at 4:12 PM

Yes, thats also true. Once Compiler as Service has shipped. So, in 1-5 years I'll be able to re-write all the rules (about 200-400 hrs) work to work with any language - or it'll carry on as it is for a while more.

Apr 13, 2011 at 2:38 PM

Just found out about NRefactory a C# and VB parser, this could be useful.

Also a project on CodePlex Irony could be used for a SQL implementation.  I used it in the past and it is simply amazing.  A VB.Net grammar could theoretically be created with it too.

Apr 13, 2011 at 8:01 PM

Thank you for the information about NRefactory and Irony. The Irony solution requires Silverlight Developer.

Do you have a link to the NRefactory source?

Apr 13, 2011 at 8:37 PM

Can we use Mono.CSharp (http://www.mono-project.com/CsharpRepl) instead of Rosylyn for Compiler as Service library?

Apr 14, 2011 at 12:50 AM

I second the notion of StyleCop for VB.NET

Apr 14, 2011 at 9:40 PM

I have corresponded with the author of Irony who has given permission to use the Irony code for this project. I am looking at the Irony code and am in the process of stylecopping it.

Apr 15, 2011 at 8:39 AM

StyleCop for VB.NET, one word: yes.. (second word: please)

Apr 27, 2011 at 2:41 PM

We want it ! We use FxCop for now, but StyleCop seems to be easier and better !

Apr 27, 2011 at 4:12 PM

TATWORTH, Good luck! Sorry I couldn't do this myself but I have a lot of stuff on my plate and I barely have time for my own hobby projects. If you get it started, I will try to allocate my time for some contributions.

Apr 27, 2011 at 6:10 PM
Amrykid wrote:

TATWORTH, Good luck! Sorry I couldn't do this myself but I have a lot of stuff on my plate and I barely have time for my own hobby projects. If you get it started, I will try to allocate my time for some contributions.

Thank you for the encouragement. I am making good progress with Irony and updating it to meet StyleCop standards.

May 1, 2011 at 5:18 PM
plaurin wrote:

Just found out about NRefactory a C# and VB parser, this could be useful.

Also a project on CodePlex Irony could be used for a SQL implementation.  I used it in the past and it is simply amazing.  A VB.Net grammar could theoretically be created with it too.

I have now got a copy of Irony updated to meet StyleCop standards. How should this be submitted for general inspection? (I am in the midst of getting the StyleCop source via Tortoise Hg)

I will have a look at NRefactory if I can find out where to download it from.

Are there any other suggestions for a parser?

May 14, 2011 at 2:15 PM

TATWORTH, when you get some source code, are you going to create a fork for StyleCop?

May 14, 2011 at 4:40 PM
Amrykid wrote:

TATWORTH, when you get some source code, are you going to create a fork for StyleCop?

I am still looking at alternatives.  When it comes time to make the form, I will request someone with more experiance of MercuryHg to make the fork.

Jul 5, 2011 at 8:00 AM

I am still examining alternatives for a VB.NET parser

Jul 5, 2011 at 9:58 AM

Tatworth,

If you need a hand with anything, even grunt work on the project, give me a shout.

Cheers

Jul 6, 2011 at 12:06 AM

Thank you for your kind offer. I will email you later this week.

Jan 27, 2012 at 10:22 AM

I would very much appreciate a version of StyleCop for VB.NET. Has there been any progress on this?

Jan 30, 2012 at 8:24 AM

 


>I would very much appreciate a version of StyleCop for VB.NET. Has there been any progress on this?

I have spent much time looking at parsers but without success. I attempted to contact various Parser writers regarding using their Parser in StyleCop but was ignored. Since these Parsers are licensed with open source licenses other than MS-PL, I considered that I needed explicit dual licensing before proceeding further. Incidentally I have written a number of open source projects which are licensed under LGPL but I am always agreable to dual licensing when necesssary.

AFAIK VS2012 will change the way this problem needs to be addressed - see previous posts in this thread.

May 18, 2012 at 1:47 PM

Yes, that would be great to have StyleCop for VB.NET. I can also help.

May 29, 2012 at 10:03 AM

Hey, Did you get a VB Parser?

May 29, 2012 at 12:22 PM
abhisheku007 wrote:

Hey, Did you get a VB Parser?

Whilst I did locate a number of potential VB.NET parsers, the copyright holders ignored my request for licensing under MS-PL, which as I understand the situation would be needed for use within StyleCop.

May 29, 2012 at 1:16 PM

It may be worth while working with the Rosyln Compiler as Service code, it is still in Beta but I think it works with .net 4 at the moment.

 

Cheers

May 29, 2012 at 10:16 PM

As I understand it, Andrew intends to re-write Style-Cop to use Roslyn. Once this for C#, then VB.net can be done this way too.

Coordinator
May 30, 2012 at 8:32 AM
Edited May 30, 2012 at 9:59 AM
That's the plan - well at least look at how long it would take and what extra would it give me. Do I get the ability the autofix detected styling issues as I analyze for example?
If it moves to Roslyn (which may take 1-12 months) then someone would need to write the VB rules. That's about 400 hrs work I guesstimate. If someone gives it 4hrs a week part time then about another 2 yrs of lapsed time (for someone else)
May 30, 2012 at 9:10 AM
I would happy to participate in the creation of those rules, I would there are number of others with in the vb.net community happy to help too.

Cheers

Iain

On 30 May 2012 08:32, andyr <notifications@codeplex.com> wrote:

From: andyr

That's the plan - well at least look at how long it would take and what extra would it give me. Do I get the ability the autofix detected styling issues as I analyze for example?

If it moves to Roslyn (which may take 1-12 months) then someone would need to write the VB rules. That's about 400 hrs work I guesstimate. If someone gives it 4hrs a week part time then about another 2 yrs of lapsed time (for someone else)


~A.

On 29 May 2012, at 22:16, TATWORTH <notifications@codeplex.com> wrote:

From: TATWORTH

As I understand it, Andrew intends to re-write Style-Cop to use Roslyn. Once this for C#, then VB.net can be done this way too.

Read the full discussion online.

To add a post to this discussion, reply to this email (stylecop@discussions.codeplex.com)

To start a new discussion for this project, email stylecop@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Jul 31, 2012 at 3:28 PM

Can someone give me an update as to where this project is please. I would be more than happy to assist in the development of the VB parser and/or the rules. Please get in touch.

Coordinator
Jul 31, 2012 at 6:14 PM
Edited Aug 31, 2012 at 1:01 PM
There is no vb support.


~A.
Jan 8 at 1:38 AM
Hi,

Any Update for Vb.Net?


Thanks,
thenndral