feat(rules): no-goto -- goto is not supported in Lua 5.1 #91

Closed
opened 2026-05-27 13:31:10 +02:00 by michael · 1 comment
Owner

Problem

goto is not supported in Lua 5.1 (only from 5.2+).
DAW targets Lua 5.1. Code using goto will fail at runtime.

Discovered in DAW/fragjan#72 (pattern primitive used goto continue).

Rule

Pack: daw-lua-code
Primitive: linepattern
Pattern: goto (trailing space avoids matching variable names like goto_page)
skip_comments: true

Acceptance criteria

  • Rule added to var/rules/daw-lua-code/
  • Rule triggers on goto continue, goto skip etc.
  • Rule does not trigger on -- goto (comment)
  • Rule does not trigger on gotopage or similar identifiers

See also

  • DAW/fragjan#72 (goto in pattern primitive -- the trigger for this rule)
## Problem `goto` is not supported in Lua 5.1 (only from 5.2+). DAW targets Lua 5.1. Code using `goto` will fail at runtime. Discovered in DAW/fragjan#72 (pattern primitive used `goto continue`). ## Rule Pack: `daw-lua-code` Primitive: `linepattern` Pattern: `goto ` (trailing space avoids matching variable names like `goto_page`) skip_comments: true ## Acceptance criteria - [ ] Rule added to `var/rules/daw-lua-code/` - [ ] Rule triggers on `goto continue`, `goto skip` etc. - [ ] Rule does not trigger on `-- goto` (comment) - [ ] Rule does not trigger on `gotopage` or similar identifiers ## See also - DAW/fragjan#72 (goto in pattern primitive -- the trigger for this rule)
Author
Owner

rule already exists in daw-lua-code, was not tracked as done

rule already exists in daw-lua-code, was not tracked as done
michael 2026-05-30 11:57:13 +02:00
michael added this to the Basic Version milestone 2026-05-30 16:04:44 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#91
No description provided.