feat(primitive): lua-metadata primitive for init.lua metadata block checks #18
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type/architecture
type
bug
type
config
type
deployment
type
docs
type/documentation
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type
research
type
security
type/task
type/tech-debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/fragjan#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The init-has-* rules in daw-module pack use the pattern primitive to
check for metadata fields (id, version, tier, type, provides) in init.lua.
This causes false positives when the same field names appear in other
contexts (e.g. return tables, local variables).
Example: init.lua line 162 --
type = "git"in a return table triggersthe init-has-type rule even though the metadata block is correct.
Solution
New primitive: daw.fragjan.check.lua-metadata
Finds the
local M = {block in a Lua file and checks for requiredfields only within that block. Independent of indentation and position
in the file.
params:
field: "type" -- field name to check
block: "M" -- table variable name (default: "M")
Affected Files
Notes
Current init-has-* rules remain active but produce false positives
until this primitive is available.
Pattern primitive is not suitable for structured Lua code analysis.