Quantcast
Channel: Bashタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 2722

シェルスクリプトから仕様書を作るツール

$
0
0

自分用のメモ。

結構探したけど、なかなかこれってのがない。

  • 極力書かなくて良い
  • markdownにできる
  • ぱっと動く

くらいしか思いはなかったんだが、結構ない。

で見つけたのが、これ

#!/bin/bash
#
# @file Title of file script
# @brief Small description of the script.

アノテーションスタイルなら簡単だな、と。

# @description Multiline description goes here and
# there
#
# @example
#   some:other:func a b c
#   echo 123
#
# @arg $1 string Some arg.
# @arg $@ any Rest of arguments.
#
# @noargs
#
# @exitcode 0  If successfull.
# @exitcode >0 On failure
# @exitcode 5  On some error.
#
# @stdout Path to something.
#
# @see some:other:func()
some:first:func() {

これでビルド時にドキュメント化させようかな


Viewing all articles
Browse latest Browse all 2722

Trending Articles