Closed Spatenheinz closed 1 day ago
I think this would be great. The relevant code is here. There's already a function for getting the last doc comment, which is used to get recipe doc comments. All that's needed is to add a comment field to Item::Module
, populate it by calling pop_doc_comment
when parsing, and it through to the parsed Justfile
, and display it in --list
.
I will get to it then :D
Comment style doc for modules works for me, but [doc]
attribute style doesn't work? :confused:
[doc("Foo.")]
mod j
$ just --unstable --list
error: Expected '*', ':', '$', '=', identifier, or '+', but found end of line
——▶ justfile:2:6
│
2 │ mod j
│ ^
The [doc(…)]
syntax hasn't been implemented yet, I opened #2207 to track it.
With the Justfiles (in v. 1.29.1):
calling
just --list
gives:It would be great if modules has doc comments similar to recipes.