linter.yml 661 B

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