| 1 |
name: Linter |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
- v* |
| 8 |
paths: |
| 9 |
- "**/*.go" |
| 10 |
pull_request: |
| 11 |
types: [opened, synchronize, reopened] |
| 12 |
paths: |
| 13 |
- "**/*.go" |
| 14 |
|
| 15 |
jobs: |
| 16 |
lint: |
| 17 |
if: github.repository != 'v2ray/v2ray-core' |
| 18 |
runs-on: ubuntu-latest |
| 19 |
steps: |
| 20 |
- name: Set up Go 1.x |
| 21 |
uses: actions/setup-go@v2 |
| 22 |
with: |
| 23 |
go-version: ^1.15 |
| 24 |
|
| 25 |
- name: Checkout codebase |
| 26 |
uses: actions/checkout@v2 |
| 27 |
|
| 28 |
- name: golangci-lint |
| 29 |
uses: golangci/[email protected] |
| 30 |
with: |
| 31 |
version: v1.31 |
| 32 |
args: --config=.github/linters/.golangci.yml |
| 33 |
only-new-issues: true |