feat(rules): extend no-direct-io to cover all io.* patterns #39

Closed
opened 2026-05-25 11:51:45 +02:00 by michael · 1 comment
Owner

Problem

The current no-direct-io rule only checks for io.open. Direct calls to
io.write, io.read, io.stderr:write, io.stdout:write etc. are not caught.

Goal

Extend the rule (or add a companion rule) to flag all io. calls in Lua code.

Special case: main.lua load_runtime

load_runtime() in main.lua must use io.stderr:write directly -- no DAW
libs are available yet when it runs. This line must be suppressible via
fragjan's line-level suppression mechanism (DAW/fragjan#12).

This issue depends on suppression being functional before the rule can be
enforced without false positives.

Acceptance criteria

  • Rule covers io.open, io.write, io.read, io.stderr, io.stdout
  • main.lua load_runtime lines suppressible via inline suppression
  • Rule documented in daw-code pack
## Problem The current `no-direct-io` rule only checks for `io.open`. Direct calls to `io.write`, `io.read`, `io.stderr:write`, `io.stdout:write` etc. are not caught. ## Goal Extend the rule (or add a companion rule) to flag all `io.` calls in Lua code. ## Special case: main.lua load_runtime `load_runtime()` in `main.lua` must use `io.stderr:write` directly -- no DAW libs are available yet when it runs. This line must be suppressible via fragjan's line-level suppression mechanism (DAW/fragjan#12). This issue depends on suppression being functional before the rule can be enforced without false positives. ## Acceptance criteria - [ ] Rule covers `io.open`, `io.write`, `io.read`, `io.stderr`, `io.stdout` - [ ] `main.lua` load_runtime lines suppressible via inline suppression - [ ] Rule documented in daw-code pack
Author
Owner

Done

  • no-direct-io.yaml renamed to no-direct-io-open.yaml (rule_id: no-direct-io-open)
  • Added: no-direct-io-write.yaml, no-direct-io-read.yaml, no-direct-io-stderr.yaml, no-direct-io-stdout.yaml
  • pack.yaml updated with all 5 rules
  • Verified against DAW/fragjan and DAW/merkwerk -- findings correct

Open

  • main.lua load_runtime lines (io.stderr) need inline suppression (DAW/fragjan#12 functional)
## Done - no-direct-io.yaml renamed to no-direct-io-open.yaml (rule_id: no-direct-io-open) - Added: no-direct-io-write.yaml, no-direct-io-read.yaml, no-direct-io-stderr.yaml, no-direct-io-stdout.yaml - pack.yaml updated with all 5 rules - Verified against DAW/fragjan and DAW/merkwerk -- findings correct ## Open - main.lua load_runtime lines (io.stderr) need inline suppression (DAW/fragjan#12 functional)
michael 2026-05-26 06:27:54 +02:00
michael added this to the Basic Version milestone 2026-05-30 16:05:00 +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#39
No description provided.