add devel notes, enforce 80 columns

This commit is contained in:
Dave Eddy 2018-11-12 13:31:34 -05:00
parent f41c6ccd7e
commit 13b0bff445
2 changed files with 30 additions and 0 deletions

View File

@ -30,4 +30,5 @@ uninstall:
.PHONY: check
check:
awk 'length($$0) > 80 { exit(1); }' $(NAME)
shellcheck $(NAME)

View File

@ -84,6 +84,35 @@ Usage
-v increase verbosity
-V print the version number and exit
Development Notes
-----------------
### Style
[shellcheck](https://www.shellcheck.net/) is used to check bash style. Use
`make check` to run the style checker:
$ make check
awk 'length($0) > 80 { exit(1); }' zfs-prune-snapshots
shellcheck zfs-prune-snapshots
Bash style guide: https://www.daveeddy.com/bash/
### Manpage
Use `make man` to regenerate the manpage:
$ make man
md2man-roff man/zfs-prune-snapshots.md > man/zfs-prune-snapshots.1
$ ./man/zfs-prune-snapshots.1
<man page opens>
Manpages are generated with [md2man](https://github.com/sunaku/md2man) which
requires `ruby-devel` to be installed. Once `ruby` is installed, `md2man` can
be installed locally with:
$ gem install --user-install md2man
License
-------