icsharpcode / NRefactory

NRefactory - Refactoring Your C# Code
684 stars 263 forks source link

Created ported version of the suggested using var analyzerusing Roslyn #481

Closed Kavignon closed 9 years ago

Kavignon commented 9 years ago

Included NUnitTestAdapter to project to enable work station to launch test code.

In the tests, the TestInspectorCase1 does not passed. I understand it should not, but I dont understand what Visual Studio is trying to tell me. The second test, do you want me to add a diagnostic result as there was an error that was intercepted or should I just leave it as it is?

I left comments in my analyzer. It was mostly to help you understand what I was thinking as I was doing the analysis. If you want me to remove them, I'll remove them later.

Kavignon commented 9 years ago

I had to add the reference otherwise the tests were not running. I'm looking at the gather visitor, whats is this "PrimitiveType"

Kavignon commented 9 years ago

If understand correctly, I only lack some logic from the GatherVisitor as what I wrote does some of the work the analyzer previously did? When I had this, then I can consider the analyzer as ready for a pull request ?

mkrueger commented 9 years ago

If you need the references locally please do not commit them.

mkrueger commented 9 years ago

Yeah but only commit the visitor + unit test and not project changes if it's not needed to. Other than that this is the way to go.

When you've ported your 3rd analyzer things will be much easier :)

Kavignon commented 9 years ago

Perfect thank you Mike ! :) Hmm, what I'm going to do is close this pull request and "redo it" but without commiting my changes in the project. In this particular situation, should I look for other situations that I should test or what I have covers most of the use cases ? How should I know if I should include more than what is already in place ?