2020-09-09 10:19:49 +00:00
|
|
|
name: Linter
|
2020-06-19 13:19:37 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-11-23 12:51:58 +00:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- v*
|
2020-09-16 14:00:52 +00:00
|
|
|
paths:
|
|
|
|
- "**/*.go"
|
2021-02-24 06:22:37 +00:00
|
|
|
- ".github/workflows/linter.yml"
|
2020-06-19 13:19:37 +00:00
|
|
|
pull_request:
|
2020-08-24 16:04:31 +00:00
|
|
|
types: [opened, synchronize, reopened]
|
2020-09-16 14:00:52 +00:00
|
|
|
paths:
|
|
|
|
- "**/*.go"
|
2021-02-24 06:22:37 +00:00
|
|
|
- ".github/workflows/linter.yml"
|
2020-06-19 13:19:37 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-08-24 08:09:51 +00:00
|
|
|
lint:
|
2021-06-22 14:36:23 +00:00
|
|
|
if: github.repository == 'v2fly/v2ray-core'
|
2020-06-19 13:19:37 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-08-30 17:09:45 +00:00
|
|
|
- name: Set up Go 1.x
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2021-08-21 05:20:40 +00:00
|
|
|
go-version: ^1.17
|
2020-08-30 17:09:45 +00:00
|
|
|
|
|
|
|
- name: Checkout codebase
|
2020-06-19 13:19:37 +00:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-09-09 09:50:36 +00:00
|
|
|
- name: golangci-lint
|
2021-04-05 07:00:35 +00:00
|
|
|
uses: golangci/golangci-lint-action@v2.5.2
|
2020-09-09 09:50:36 +00:00
|
|
|
with:
|
2021-02-24 06:22:37 +00:00
|
|
|
version: latest
|
2020-09-16 07:18:25 +00:00
|
|
|
args: --config=.github/linters/.golangci.yml
|
2020-09-18 08:48:45 +00:00
|
|
|
only-new-issues: true
|