From 87c89745fbc28759e5806fcc04d7b85b75fb6d15 Mon Sep 17 00:00:00 2001 From: Chirantan Ekbote Date: Tue, 30 Aug 2022 16:51:36 +0900 Subject: [PATCH] scripts: Add go sdk to lint.sh --- scripts/lint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/lint.sh b/scripts/lint.sh index a3e4b0020..993b27a49 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -43,7 +43,7 @@ format(){ fi # Use -exec because of pitfall #1 in http://mywiki.wooledge.org/BashPitfalls - GOFMT_OUTPUT="$(find ./node ./event_database -type f -name '*.go' -not -path './node/pkg/proto/*' -print0 | xargs -r -0 goimports $GOIMPORTS_ARGS 2>&1)" + GOFMT_OUTPUT="$(find "./sdk" "./node" "./event_database" -type f -name '*.go' -not -path './node/pkg/proto/*' -print0 | xargs -r -0 goimports $GOIMPORTS_ARGS 2>&1)" if [ -n "$GOFMT_OUTPUT" ]; then if [ "$GITHUB_ACTION" == "true" ]; then @@ -63,6 +63,9 @@ lint(){ # Do the actual linting! cd "$ROOT"/node golangci-lint run --skip-dirs pkg/supervisor --timeout=10m --path-prefix=node $GOLANGCI_LINT_ARGS ./... + + cd "${ROOT}/sdk" + golangci-lint run --timeout=10m $GOLANGCI_LINT_ARGS ./... } DOCKER="false"