In VB.Net, the SonarLint rule S3385 Remove this 'Exit' statement triggers on all types of Exit statements.
Please break this down into multiple rules so that severities can be assigned for each case:
There are some that have no replacement (like Exit Do, Exit While) -- these should be suggestions to restructure the code -- or ignored.
I think that Exit (i.e. kill process) should be banned entirely, so deserves a separate rule that can be marked as Error.
Exit Sub can blindly be replaced with Return, while Exit Function must be manually analyzed to ensure
that it doesn't affect flow control/return value.
So as you can see each Exit variant deserves it's own rule so that severity can be managed appropriately for each.
Also, please improve the Description to provide more actionable guidance.
[Moved from https://github.com/SonarSource/sonarlint-visualstudio/issues/766, created by @burtonrodman]
In VB.Net, the SonarLint rule S3385 Remove this 'Exit' statement triggers on all types of Exit statements.
Please break this down into multiple rules so that severities can be assigned for each case:
There are some that have no replacement (like Exit Do, Exit While) -- these should be suggestions to restructure the code -- or ignored.
I think that Exit (i.e. kill process) should be banned entirely, so deserves a separate rule that can be marked as Error.
Exit Sub can blindly be replaced with Return, while Exit Function must be manually analyzed to ensure that it doesn't affect flow control/return value.
So as you can see each Exit variant deserves it's own rule so that severity can be managed appropriately for each.
Also, please improve the Description to provide more actionable guidance.