Problem
#USAGE directive fields are hand-written across mise tasks, and field ordering is easy to drift. In KnickKnackLabs/shell#12, Or noted that a directive like:
#USAGE arg "input" default="" help="Input to send" var=#true
would be more readable/consistent with structural fields earlier, e.g. var=#true before prose help, and likely before default="" as well.
Proposal
Add a codebase lint rule for #USAGE field ordering in mise task comments.
Possible canonical ordering, to refine while implementing:
- directive kind / name, e.g.
arg "input" or flag "--raw"
- structural parser fields, e.g.
var=#true
- defaults / value metadata, e.g.
default=""
- human-facing prose, e.g.
help="..."
Notes
- The rule should probably start as autofixable or at least produce a clear expected-order diagnostic.
- It should avoid changing quoted strings or directive semantics.
- Source prompt: Or review comment on
KnickKnackLabs/shell#12.
Problem
#USAGEdirective fields are hand-written across mise tasks, and field ordering is easy to drift. InKnickKnackLabs/shell#12, Or noted that a directive like:#USAGE arg "input" default="" help="Input to send" var=#truewould be more readable/consistent with structural fields earlier, e.g.
var=#truebefore prosehelp, and likely beforedefault=""as well.Proposal
Add a
codebaselint rule for#USAGEfield ordering in mise task comments.Possible canonical ordering, to refine while implementing:
arg "input"orflag "--raw"var=#truedefault=""help="..."Notes
KnickKnackLabs/shell#12.