What if I want to add the following rules?
There is no ELSE in the IF statement…
My aim is when I write the following source, ELSE
I want to get the insight that I have to prepare an ELSE case in a situation where I have not prepared.
https://rules.sonarsource.com/vbnet/RSPEC-126
Similar but slightly different,isn’t it?
If x = 0 Then
DoSomething()
’
End If
I’m using SonarLint ,under Visual Studio 2019.
Thank,you
Hi @yoshida2021,
Welcome to our community.
Let me see if I understood right: you want a rule which will check that all If
statements end with ElseIf
?
Thanks,
Costin
[quote=“costin.zaharia, post:4, topic:40588”]
Welcome to our community.
Hi Costin
Thanks,a lot.
As an indecent, you can add rules,
That helps a lot.
If choose in the check box, if this rule is unnecessary, will not be affected
Hi @yoshida2021,
We discussed internally and we will not implement the suggested rule, we think that it would generate too much noise.
Thank you,
Costin