feat(rules): add no-hardcoded-tmp-prefix rule for daw-code pack #69

Closed
opened 2026-05-25 19:59:17 +02:00 by michael · 1 comment
Owner

Goal

Add rule to detect hardcoded project-specific prefixes in /tmp/ paths.
Common modules must use a neutral prefix like /tmp/daw_*.

Rule

no-hardcoded-tmp-prefix:
primitive: pattern
pattern: "/tmp/"
file_pattern: "*.lua"
severity: warn
message: "{file}: hardcoded /tmp/ path -- use neutral daw_ prefix"

Notes

Belongs in daw-code pack.
Found in: crypto.lua (steurjan_hash_ prefix), base64.lua.

## Goal Add rule to detect hardcoded project-specific prefixes in /tmp/ paths. Common modules must use a neutral prefix like /tmp/daw_*. ## Rule no-hardcoded-tmp-prefix: primitive: pattern pattern: "/tmp/" file_pattern: "*.lua" severity: warn message: "{file}: hardcoded /tmp/ path -- use neutral daw_ prefix" ## Notes Belongs in daw-code pack. Found in: crypto.lua (steurjan_hash_ prefix), base64.lua.
Author
Owner

Implemented: two rules added to daw-lua-code pack.

no-hardcoded-tmp-prefix: detects /tmp/ paths (2 hits in fragjan article.lua).
no-temp-dir-literal: detects .temp hardcoded directories (2 hits in daw-module-manager sig.lua and index.lua, covered by DAW/daw-module-manager#12).

Implemented: two rules added to daw-lua-code pack. no-hardcoded-tmp-prefix: detects /tmp/ paths (2 hits in fragjan article.lua). no-temp-dir-literal: detects .temp hardcoded directories (2 hits in daw-module-manager sig.lua and index.lua, covered by DAW/daw-module-manager#12).
michael 2026-05-26 16:22:07 +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#69
No description provided.