3 ms·
Take a look at shfmt and shdoc. One is an auto formatter, the other does autodocs. I wouldn't invent yet another docstring format. It's already been done. Just
by bashhacker 5y ago
Take a look at shfmt and shdoc. One is an auto formatter, the other does autodocs. I wouldn't invent yet another docstring format. It's already been done. Just check compliance with an existing format.
- a-t-0 5y ago@bashhacker, thank you for the suggestion! I included shdoc in the list, and added the synonym shfmt to the sh formater (which includes shfmt). I agree with not making another docstring format. Accordingly, I updated the readme to explicitly also allow the linter to support the docstring format as provided by another style; that of shdoc. In essence, the user should be able to configure the linter to adhere to Google Shell Style Guide or the one used by shdoc (or another, or some non-conflicting combination of options). To start somewhere, I propose Google Shell Style guide.
- drran 5y agoI just did it. I use Markdown for bash-modules documentation. :-/ A procedure in bash can have way more complex interface than simple function call. See http://vlisivka.github.io/bash-modules/arguments.html http://vlisivka.github.io/bash-modules/arguments.html for example.