diff --git a/rules/S3626/csharp/rule.adoc b/rules/S3626/csharp/rule.adoc index 8b1db04666e..4e1b35e7c1b 100644 --- a/rules/S3626/csharp/rule.adoc +++ b/rules/S3626/csharp/rule.adoc @@ -1,6 +1,6 @@ == Why is this an issue? -Jump statements, such as ``++return++``, ``++yield break++``, ``++goto++``, and ``++continue++`` let you change the default flow of program execution, but jump statements that direct the control flow to the original direction are just a waste of keystrokes. +Jump statements, such as `return`, `yield break`, `goto`, and `continue` are used to change the normal flow of execution in a program. However, redundant jump statements can make code difficult to read and maintain. === Noncompliant code example @@ -41,6 +41,10 @@ void Foo() } ---- +=== Exceptions + +* `return` statements followed by a local function declaration are not considered redundant, as they help with readability. + ifdef::env-github,rspecator-view[] '''