Closed AdamSpeight2008 closed 10 years ago
folder layout is completely wrong. those should be under src.
Do we really need a separate project for this? Cannot this be written in C# and target VB?
@tugberkugurlu
There's nothing wrong with VB.net
My other diagnostic SFD the C# target is written in VB.net because VB.net has a better implementation of the switch statement.
@AdamSpeight2008 I didn't say there is something wrong with VB.NET :smile: I don't think it's necessary here. You can implement this inside the same project with possibly a huge amount of code reuse (I'm just assuming).
The syntax nodes of C# and VB.net are just different enough to be a pain the posterior.
CSharp SyntaxNode != VB SyntaxNode They completely different entities. They only looks similar do to imports,
@sharwell what do you think? Should this be written in VB?
@tugberkugurlu I've only moved your refactoring to a CSharp folder, with the solution. (It is still in C#) I did this so potential the project names could be the same without a clash.
It's very difficult to reuse code that operates on the syntax tree as opposed to strictly working with the semantic model. I wouldn't have a problem with implementing them in separate projects, but I can say it would slow me down a bit if someone filed a bug report against the VB implementation.
I will propose a new project structure though, which more closely aligns with the original one created by @tugberkugurlu.
See
I'm almost done :)
OK I just created pull request #10. It essentially "moves the C# code out of the way" so you can add a new project NullParameterCheckRefactoring.VB to match it. There is no need to create more than one VSIX project, since it's easy to include both assemblies in one package.
The separate VSIX let you debug that specific analyser. The combine VSIX pulls from the two projects as MEF Component assets.
I've never had a problem developing or debugging multiple assemblies within a single VSIX (some of my extensions are very complicated, but none of them involve both VB and C# assemblies together). Are there particular concerns you have regarding the functionality? While I certainly prefer a simpler project layout where possible, I don't want to force the use of a single VSIX if it will cause problems with the development cycle.
@sharwell There are just .net assemblies. It doesn't matter what .net language they are written in both C# and VB.net compile to .net assemblies. The DLL I'm referencing could be written Nemerle, Boo, C#, VB
Projects Names are now
@AdamSpeight2008 I implemented what I was thinking of in the following branch. I made sure to rebase your work so you still get credit for the VB implementation in the commit.
https://github.com/sharwell/NullParameterCheckRefactoring/compare/vb-support
How does that look to you?
@sharwell can you put this project under src folder as well? https://github.com/sharwell/NullParameterCheckRefactoring/tree/c09a306130fd3af9052883efac1fe8308909f4ac/NullParameterCheckRefactoring
I didn't know you where allowed to have .CSharp and .VB in Project names. That's why I tend to use (CS) and (VB).
Also we need to add a release notes and getting started guide, I've used https://github.com/DotNetAnalyzers/NullParameterCheckRefactoring for the More Info Url
@tugberkugurlu Those aren't referenced. I just forgot to remove them (which has now been corrected).
@sharwell so, which one are we going to merge now :smile:?
@tugberkugurlu I could alter the existing C# to include the update?
@AdamSpeight2008 doesn't really matter to me as long as the structure is stays correct but it sounds like @sharwell did all the work in his fork?
What is the structure?
I don't have permission to push to @AdamSpeight2008 's repository, or to change the reference branch for this pull request. If you want to use my code (which includes @AdamSpeight2008 's work as one commit), then we need to do one of the following:
How do I do the first?
@AdamSpeight2008 I think it doesn't matter since @tugberkugurlu rebases changes anyway. Did you get a chance to try it out? If not, the steps to try it are:
fetch
command to pull down my work.I've just added you as a collaborator
I've renamed my local copy and clone yours, and I look at the VB Branch
I have to run some errands, but I look forward to seeing your feedback when I return. Supporting both languages is a huge step forward for this analyzer.
I deleted by repo and the forked @sharwell
Restructured Folder Layout. Added VB.net support (VS2015) Created merged VSIX