X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/3391e4eaab1c20e3b172c443186b1947622a679e..bd7da3557dc7a17020931f5a49ed5007fa81a645:/bin/check diff --git a/bin/check b/bin/check index 73256cb..1b608bb 100755 --- a/bin/check +++ b/bin/check @@ -13,10 +13,20 @@ if [ -n "$unformatted" ]; then exit 1 fi +# Comment lines stay within the width of bin/reflow, with tabs as 8 columns. +long=$(files '*.go' | while read -r file; do + expand -t8 "$file" | awk -v file="$file" 'length > 80 && /^[[:space:]]*\/\//{print file ":" FNR}' +done) +if [ -n "$long" ]; then + printf 'comment lines over 80 columns, run bin/reflow:\n%s\n' "$long" >&2 + exit 1 +fi + go vet ./... golangci-lint run go test -race -short ./... files '*.nix' | xargs nixfmt --check files '*.rst' | xargs rstfmt --check files '*.md' | xargs mdformat --check -shellcheck bin/check bin/format bin/reflow bin/service-update .githooks/commit-msg +bash .githooks/commit-msg-test +shellcheck bin/check bin/format bin/reflow bin/service-update .githooks/commit-msg .githooks/commit-msg-test