Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

New Rule: no obsolete jump statements #49

Copy link
Copy link
Closed
@silviomarghitola

Description

@silviomarghitola
Issue body actions

Language Usage / Control Structures / Flow Control
Avoid using jump statements that direct the flow to the default direction

from SonarQube

Jump statements should not be redundant

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 print_numbers AS
BEGIN
  FOR i in 1..4 LOOP
    DBMS_OUTPUT.PUT_LINE(i);
    CONTINUE;
  END LOOP;
  RETURN;
END;

Compliant Solution

CREATE PROCEDURE print_numbers AS
BEGIN
  FOR i in 1..4 LOOP
    DBMS_OUTPUT.PUT_LINE(i);
  END LOOP;
END;

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.