Skip to content

Commit

Permalink
ci: fix lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
docwhat committed Jul 11, 2024
1 parent 964de5e commit 178be45
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-
- run: ./script/bootstrap
- run: golangci-lint run ./...
- run: ./script/lint

test:
runs-on: ubuntu-latest
Expand Down
12 changes: 10 additions & 2 deletions script/lint
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ set -euo pipefail
root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
readonly root

echo "Running lint..."
"${root}/script/trunk" check
flags=()

if [[ -n ${CI-} ]]; then
echo "Running lint in CI mode..."
flags+=("--ci")
else
echo "Running lint..."
fi

"${root}/script/trunk" check "${flags[@]:+"${flags[@]}"}"

# vim: set ft=sh :

0 comments on commit 178be45

Please sign in to comment.