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