Add golangci-lint to Go build step
This commit is contained in:
@@ -9,6 +9,20 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
|
golangci-lint:
|
||||||
|
name: Lint Server
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Run golangci-lint
|
||||||
|
uses: actions-contrib/golangci-lint@v1
|
||||||
|
with:
|
||||||
|
golangci_lint_version: v1.25.0
|
||||||
|
# TODO Enable github actions output format: https://github.com/actions-contrib/golangci-lint/issues/11
|
||||||
|
# args: run --out-format github-actions
|
||||||
|
|
||||||
go:
|
go:
|
||||||
name: Test Server on ${{ matrix.os }}
|
name: Test Server on ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -76,7 +90,7 @@ jobs:
|
|||||||
|
|
||||||
binaries:
|
binaries:
|
||||||
name: Binaries
|
name: Binaries
|
||||||
needs: [js, go]
|
needs: [js, go, golangci-lint]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
linters:
|
||||||
|
enable:
|
||||||
|
- goimports
|
||||||
|
- unconvert
|
||||||
|
- gosec
|
||||||
|
|
||||||
|
issues:
|
||||||
|
exclude-rules:
|
||||||
|
- linters:
|
||||||
|
- gosec
|
||||||
|
text: "(G501|G401):"
|
||||||
Reference in New Issue
Block a user