just
just copied to clipboard
Preserve module doc and group attributes when formatting
The documentation says I can annotate modules with doc and group (amongst other things).
bsh ❯ just
Available recipes:
[apps]
pihole ... # Manage the pihole configuration
[help]
help # Show recipes
When we format the justfile then we lose the [doc()] and [group()] tags.
bsh ❯ just --unstable --fmt --justfile Justfile
Wrote justfile to `/home/lchan/code/personal/just-fmt-repro/Justfile`
bsh ❯ just
Available recipes:
pihole ...
[help]
help # Show recipes
bsh ❯ cat Justfile
set positional-arguments := true
mod pihole "pihole.just"
[doc("Show recipes")]
[group("help")]
@help:
just --list --list-prefix " "
The justfiles as referenced above are here : https://github.com/quotidian-ennui/just-fmt-repro
Can you copy and paste the before and after of the formatted justfile?
Before (as per https://github.com/quotidian-ennui/just-fmt-repro/blob/main/Justfile)
set positional-arguments := true
[doc("Manage the pihole configuration")]
[group("apps")]
mod pihole "pihole.just"
[group("help")]
[doc("Show recipes")]
@help:
just --list --list-prefix " "
After is as per the issue details (2nd code block):
set positional-arguments := true
mod pihole "pihole.just"
[doc("Show recipes")]
[group("help")]
@help:
just --list --list-prefix " "
Thanks! This is definitely a bug.