Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

New Rule: never reuse labels in inner scopes #50

Closed
Assignees
kibeha
Labels
enhancementNew feature or requesthelp wantedExtra attention is needed
Milestone
@silviomarghitola

Description

@silviomarghitola

Language Usage / Control Structures / Flow Control
Never reuse a label within its own scope

fromSonarQube

Labels should not be reused in inner scopes

Using the same name for multiple purposes reduces the understandability of the code and might eventually lead to bugs.

This rule verifies that no label is reused in an inner scope.

Noncompliant Code Example

<<foo>>DECLARE  a CONSTANT PLS_INTEGER :=0;BEGIN<<foo>>  DECLARE    b CONSTANT PLS_INTEGER :=42;BEGINDBMS_OUTPUT.PUT_LINE('x ='||foo.b);  END;END;

Compliant Solution

<<foo>>DECLARE  a CONSTANT PLS_INTEGER :=0;BEGIN<<bar>>  DECLARE    b CONSTANT PLS_INTEGER :=42;BEGINDBMS_OUTPUT.PUT_LINE('x ='||bar.b);  END;END;

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp