github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/.github/workflows/linter.yml (about)

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