linter.yml 663 B

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