Run golangci-lint as part of CI

https://golangci-lint.run/usage/install/#ci-installation
This commit is contained in:
Brandon Weeks 2022-11-01 12:01:50 -07:00 committed by Brandon Weeks
parent 438907edb0
commit 19d3c4de97
2 changed files with 23 additions and 0 deletions

18
.github/workflows/golangci-lint.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: golangci-lint
on:
pull_request:
permissions:
contents: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19.3
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.50.1

5
.golangci.yaml Normal file
View File

@ -0,0 +1,5 @@
linters:
enable:
- gofmt
disable:
- errcheck