Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create rule S7173: "GoSub" statements should not be used #4580

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

github-actions[bot]
Copy link
Contributor

You can preview this rule here (updated a few minutes after each push).

Review

A dedicated reviewer checked the rule description successfully for:

  • logical errors and incorrect information
  • information gaps and missing content
  • text style and tone
  • PR summary and labels follow the guidelines

@github-actions github-actions bot added the vb6 label Dec 18, 2024
@sebastien-marichal sebastien-marichal changed the title Create rule S7173 Create rule S7173: "GoSub" statements should not be used Dec 18, 2024
Comment on lines 7 to 9
=== Exceptions

`On Error GoSub` statements are ignored as correct error handling.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is an exception for GoTo so I kept it but I am not sure if this valid or even still relevant.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken error handlers have to be inside a function / sub to be available with GoTo so I would strongly guess that GoSub is not possible in this context.

Copy link
Member

@thahnen thahnen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my comments.

Comment on lines 7 to 9
=== Exceptions

`On Error GoSub` statements are ignored as correct error handling.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken error handlers have to be inside a function / sub to be available with GoTo so I would strongly guess that GoSub is not possible in this context.

Copy link
Member

@thahnen thahnen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sebastien-marichal sebastien-marichal marked this pull request as ready for review December 20, 2024 09:07
@sebastien-marichal sebastien-marichal enabled auto-merge (squash) December 20, 2024 09:07
Copy link

Quality Gate passed Quality Gate passed for 'rspec-tools'

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link

Quality Gate passed Quality Gate passed for 'rspec-frontend'

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@sebastien-marichal sebastien-marichal merged commit 98e58e1 into master Dec 20, 2024
8 of 10 checks passed
@sebastien-marichal sebastien-marichal deleted the rule/add-RSPEC-S7173 branch December 20, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants