Why is this an issue?
Jump statements, such as RETURN
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.
Noncompliant code example
CREATE PROCEDURE MyProc
AS
DECLARE @return_status int = 0;
WHILE @return_status = 0
BEGIN
EXEC @return_status = something;
CONTINUE; -- Noncompliant
END;
RETURN; -- Noncompliant
GO
Compliant solution
CREATE PROCEDURE MyProc
AS
DECLARE @return_status int = 0;
WHILE @return_status = 0
BEGIN
EXEC @return_status = something;
END;
GO