check / check (push) Waiting to run
main's tree, with next merged on 26 October, as one commit onto prod, on sneak's order. Model: opus-5-5 Co-authored-by: clawbot <clawbot@noreply.example.org>
21 lines
639 B
Bash
Executable File
21 lines
639 B
Bash
Executable File
#!/bin/sh
|
|
# script/fmt: format the whole repo (writes): prettier over the
|
|
# JavaScript, CSS, HTML and Markdown, then gofmt over the Go sources in
|
|
# cmd/ and internal/; not over the whole root, as node_modules/ holds
|
|
# .go files of its own. The org model formats only markdown; this repo
|
|
# also has JS and Go.
|
|
set -eu
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
# script/bootstrap links the node, yarn and gofmt it installs into
|
|
# ~/.local/bin, which the shell that called it may not have on PATH.
|
|
PATH="$HOME/.local/bin:$PATH"
|
|
"$ROOT/script/frontend-fmt"
|
|
gofmt -l -w cmd internal
|
|
}
|
|
|
|
main "$@"
|