setup golangci-lint-action

enable goimports
This commit is contained in:
Matthieu MOREL 2021-11-08 21:56:21 +01:00 committed by MOREL Matthieu
parent b086bee7c3
commit 5e213d877c
3 changed files with 31 additions and 3 deletions

View File

@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.15
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.17
id: go
- name: Check out code into the Go module directory

23
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Golangci-lint
on: [push, pull_request]
jobs:
golangci:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
args: --verbose

5
.golangci.yml Normal file
View File

@ -0,0 +1,5 @@
run:
timeout: 5m
linters:
enabled:
- goimports