+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_js_analyze): fix how control flow edges are generated in for-statements with no test node #3516

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

leops
Copy link
Contributor

@leops leops commented Oct 27, 2022

Summary

Fixes #3511

This PR fixes the control flow graph generation of for-statements with no test node by correctly generating an unconditional jump edge from the condition block to the loop block instead of not generating an edge at all.

Test Plan

I've added an additional test case for the noUnreachable rule to check this, and updated a CLI snapshot that was also triggering the rule

@leops leops requested a review from xunilrj as a code owner October 27, 2022 11:52
@leops leops temporarily deployed to netlify-playground October 27, 2022 11:52 Inactive
@netlify
Copy link

netlify bot commented Oct 27, 2022

Deploy Preview for rometools ready!

Name Link
🔨 Latest commit f0a09ed
🔍 Latest deploy log https://app.netlify.com/sites/rometools/deploys/635a70e2e7119c00083dca6a
😎 Deploy Preview https://deploy-preview-3516--rometools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

@MichaReiser
Copy link
Contributor

Thank you @leops <3

@leops leops merged commit bca5396 into main Oct 27, 2022
@leops leops deleted the fix/cfg-for-stmt branch October 27, 2022 12:28
@leops leops added the A-Linter Area: linter label Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 noUnreachable reports for update as unreachable if test is empty
3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载