Skip to content

Commit c1590ea

Browse files
committed
Add make lint job to locally lint changes before pushing to remote
1 parent 331a885 commit c1590ea

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ jobs:
4343
uses: golangci/golangci-lint-action@v3
4444
with:
4545
# version of golangci-lint to use
46+
# Version should stay in sync with version used for local linting (lint job in Makefile).
4647
version: v1.50.1

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ $(plugins_dir):
4242
test:
4343
go test ./...
4444

45+
lint:
46+
# Version used should stay in sync with version in CI (.github/workflows/test.yaml).
47+
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.50.1 golangci-lint run
48+
4549
%/remove-local: beta-notice
4650
$(eval plugin := $(firstword $(subst /, ,$@)))
4751
rm -f ~/.op/plugins/local/$(plugin)

0 commit comments

Comments
 (0)