Skip to content

Commit

Permalink
add golangci-lint job (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanato authored Sep 11, 2024
1 parent a0610da commit e06d89e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint

on:
pull_request:

permissions:
contents: read


jobs:

golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
version: v1.60
10 changes: 5 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Visit https://golangci-lint.run/ for usage documentation
# and information on other useful linters
---
run:
timeout: 5m

issues:
max-per-linter: 0
max-issues-per-linter: 0
max-same-issues: 0

linters:
disable-all: true
enable:
- durationcheck
- errcheck
- exportloopref
- forcetypeassert
- godot
- gofmt
Expand All @@ -24,4 +25,3 @@ linters:
- unconvert
- unparam
- unused
- vet

0 comments on commit e06d89e

Please sign in to comment.