CleanCode
CleanCode copied to clipboard
VB.NET support for several rules
I started to add vb.net support to one of the rules. If you like the approach i am going to add mor vb.net support.
A design question: Is it possiple to share one TooManyArgumentsHighlighting for c# and vb.net by adding an array to the languages of ConfigurableSeverityHighlighting?
This is awesome, thanks!
As you suggest, you can share a highlight between languages, by adding VBASIC
to the languages
parameter. Something like:
// The same as "CSHARP,VBASIC"
[ConfigurableSeverityHighlighting(SeverityID, CSharpLanguage.Name + "," + VBLanguage.Name)]
public class TooManyArgumentsHighlighting : Highlighting
{
// ...
}
If you update the PR with this, I'd be thrilled to merge it :)
I think the approach of effectively duplicating the analyser is probably the best, unfortunately. You could register another interface in the ElementProblemAnalyzer
(e.g. (typeof(CSharp.IMethodDeclaration), typeof(VB.IMethodDeclaration)
), but then you'd need to take in a base class, (override void Run(ITreeNode …,)
) and downcast, and I'm not sure if that would be worth the effort.
Thanks for the PR! I'd love to see more :)
Hi matt, thank you for thepositive response. I updated my PR. Didn't update the readme this time. I am planning to add some more support from time to time :)
In the meanwhile vb.net support for some more inspections
If someone need both vb.net and the new support for resharper 2017.2, come and see my fork
i just released my fork to the resharper gallery, because this project seems dead, feel free to contribute to my fork link
i added your request and added some rules myself