Skip to content

Commit

Permalink
Simplifing golangci-lint configuration
Browse files Browse the repository at this point in the history
Signed-off-by: paulfantom <[email protected]>
  • Loading branch information
paulfantom committed Oct 11, 2021
1 parent a8c6cd2 commit 1dfb1d5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

env:
golang-version: '1.15'
golangci-lint-version: 'v1.30.0'

jobs:

Expand Down Expand Up @@ -37,9 +38,9 @@ jobs:
diff -u <(echo -n) <(gofmt -d .)
- name: Lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0
/home/runner/go/bin/golangci-lint run --timeout=5m --skip-dirs=pkg/promql --skip-dirs=pkg/promb
uses: golangci/golangci-lint-action@v2
with:
version: ${{ env.golangci-lint-version }}

- name: Build
run: go build -v ./...
Expand Down
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
run:
timeout: 5m
skip-dirs:
- pkg/promql
- pkg/promb

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ go-fmt:
gofmt -d .

go-lint:
golangci-lint run --timeout=5m --skip-dirs=pkg/promql --skip-dirs=pkg/promb
golangci-lint run

all: build test e2e-test go-fmt go-lint
all: build test e2e-test go-fmt go-lint

0 comments on commit 1dfb1d5

Please sign in to comment.