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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[tools.bats]
[[tools.bats]]
version = "1.12.0"
backend = "aqua:bats-core/bats-core"

Expand All @@ -7,10 +7,10 @@ checksum = "blake3:836a0963444ede10131984991c0f92219c84418b57c242b4ff5bc80d83daa
size = 175914
url = "https://github.com/bats-core/bats-core/archive/refs/tags/v1.12.0.tar.gz"

[tools.circleci]
[[tools.circleci]]
version = "0.1.32638"
backend = "aqua:CircleCI-Public/circleci-cli"

[tools."npm:prettier"]
[[tools."npm:prettier"]]
version = "2.8.8"
backend = "npm:prettier"
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