Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions shell/fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ set -e -o pipefail

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

# shellcheck source=./lib/logging.sh
source "$DIR/lib/logging.sh"
# shellcheck source=./lib/bootstrap.sh
source "$DIR/lib/bootstrap.sh"
# shellcheck source=./lib/logging.sh
source "$DIR/lib/logging.sh"
# shellcheck source=./lib/mise.sh
source "$DIR/lib/mise.sh"
# shellcheck source=./lib/shell.sh
source "$DIR/lib/shell.sh"

Expand Down
6 changes: 4 additions & 2 deletions shell/linters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ set -e -o pipefail

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

# shellcheck source=./lib/logging.sh
source "$DIR/lib/logging.sh"
# shellcheck source=./lib/bootstrap.sh
source "$DIR/lib/bootstrap.sh"
# shellcheck source=./lib/logging.sh
source "$DIR/lib/logging.sh"
# shellcheck source=./lib/mise.sh
source "$DIR/lib/mise.sh"
# shellcheck source=./lib/shell.sh
source "$DIR/lib/shell.sh"

Expand Down
17 changes: 9 additions & 8 deletions shell/linters/protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
# shellcheck disable=SC2034
extensions=(proto)

# Runs buf [...] on all versioned .proto files.
run_buf() {
local mise_bin
mise_bin="$(find_mise)"
find_files_with_extensions "${extensions[@]}" | xargs -n1 "$mise_bin" exec buf@"$(get_tool_version buf)" -- buf "$@"
}

buf_linter() {
# Why: We're OK with this.
# shellcheck disable=SC2155
local PROTOFMT=$("$DIR/gobin.sh" -p github.com/bufbuild/buf/cmd/buf@v"$(get_tool_version "buf")")
find_files_with_extensions "${extensions[@]}" | xargs -n1 "$PROTOFMT" format --exit-code --diff
run_buf format --exit-code --diff
}

buf_formatter() {
# Why: We're OK with this.
# shellcheck disable=SC2155
local PROTOFMT=$("$DIR/gobin.sh" -p github.com/bufbuild/buf/cmd/buf@v"$(get_tool_version "buf")")
find_files_with_extensions "${extensions[@]}" | xargs -n1 "$PROTOFMT" format -w
run_buf format --write
}

linter() {
Expand Down