Skip to content

Commit

Permalink
refactor: move shellcheck under linters (#133)
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian authored Mar 11, 2024
1 parent 952f4c4 commit cf6181f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: shellcheck

---
name: lint
on:
push:
paths:
- "**.sh"
- ".github/workflows/shellcheck.yaml"

- ".github/workflows/lint-shell.yaml"
jobs:
shellcheck-lint:
shell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -17,4 +16,4 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: "${{ env.GOLANG_VERSION }}"
- run: make shellcheck
- run: make lint-shell
14 changes: 13 additions & 1 deletion make/lint.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
LINT ?= go \
proto \
shell

BUF_LINT_PACKAGES ?= provider \
node

Expand All @@ -16,8 +20,16 @@ lint-proto-%:
.PHONY: lint-proto
lint-proto: $(BUF) $(patsubst %, lint-proto-%,$(BUF_LINT_PACKAGES))

.PHONY: lint-shell
lint-shell:
docker run --rm \
--volume $(PWD):/shellcheck \
--entrypoint sh \
koalaman/shellcheck-alpine:stable \
-x /shellcheck/script/shellcheck.sh

.PHONY: lint
lint: lint-go lint-proto
lint: $(patsubst %, lint-%,$(LINT))

.PHONY: check-breaking
proto-check-breaking: $(BUF)
Expand Down
8 changes: 0 additions & 8 deletions make/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ TEST_MODULE ?= ./...

COVER_PACKAGES = $(shell go list ./... | grep -v mock | paste -sd, -)

.PHONY: shellcheck
shellcheck:
docker run --rm \
--volume $(PWD):/shellcheck \
--entrypoint sh \
koalaman/shellcheck-alpine:stable \
-x /shellcheck/script/shellcheck.sh

TEST_TIMEOUT ?= 300
TEST_RACE ?= 0
TEST_NOCACHE ?= 0
Expand Down

0 comments on commit cf6181f

Please sign in to comment.