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

Add rule to remove continue statements #227

Merged
merged 34 commits into from
Nov 22, 2024
Merged

Conversation

jeparlefrancais
Copy link
Contributor

@jeparlefrancais jeparlefrancais commented Nov 18, 2024

Closes #211 Closes #202

This rule converts continue statements into an equivalent construct that only uses break statements. This is useful to convert Luau code into Lua code!

  • add entry to the changelog

Copy link

Coverage after merging remove-continue-statement into main will be

85.96%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/process
   node_processor.rs65.31%100%66.67%64%100–106, 108, 110–120, 122–124, 43, 66, 73–75, 80–83, 90–91, 94, 97, 99
   post_visitor.rs45.63%100%53.33%44.82%109–113, 120–124, 126–130, 134–135, 137–141, 143–149, 161–163, 166, 170, 189–194, 217–219, 222, 226, 244–246, 276–278, 28, 290–292, 295, 299, 304–311, 313, 315–318, 327, 334, 360–361, 363–372, 374–390, 395, 397–399, 406, 41, 417–419, 42, 420–421, 423–426, 428–430, 432–437, 457–458, 465–477, 483–484, 486–488, 494–503, 505–509, 511–513, 515–516, 518–519, 521–535, 538–540, 542–546, 548–552, 554–555, 557–569, 572–573, 575–579, 581–585, 587–588, 590–592, 594–596, 598–601, 603–607, 609–610, 612–616, 618–619, 621–625, 627–630, 632–633, 635–636, 638–642, 644–648, 650–657, 659, 661–669, 67, 670–675, 677, 70, 73–75, 79–88
   scope_visitor.rs86.10%100%91.89%85.27%109–111, 114, 118, 144–146, 149, 153, 183–185, 200, 204, 257–267, 272, 63–65, 78–80, 83, 87
   visitors.rs98.60%100%98.57%98.60%131–136, 81–83
src/rules
   mod.rs89.10%100%82.86%89.86%116–118, 132–134, 152–154, 156, 187–189, 286, 326–328, 355, 362–365, 379, 428–430
   remove_continue.rs98.82%100%100%98.60%127, 75
src/utils
   mod.rs96.55%100%96%96.67%50–51, 58
   timer.rs100%100%100%100%

@jeparlefrancais jeparlefrancais merged commit f132b28 into main Nov 22, 2024
6 checks passed
@jeparlefrancais jeparlefrancais deleted the remove-continue-statement branch November 22, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A rule for removing (converting) continue statements
2 participants