linters.yml 1010 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Linters
  2. permissions: read-all
  3. on:
  4. pull_request:
  5. branches:
  6. - main
  7. workflow_dispatch:
  8. jobs:
  9. jshint:
  10. name: Javascript Linter
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v4
  14. - name: Install linters
  15. run: |
  16. sudo npm install -g jshint@2.13.6 eslint@8.57.0
  17. - name: Run jshint
  18. run: jshint internal/ui/static/js/*.js
  19. - name: Run ESLint
  20. run: eslint internal/ui/static/js/*.js
  21. golangci:
  22. name: Golang Linters
  23. runs-on: ubuntu-latest
  24. steps:
  25. - uses: actions/checkout@v4
  26. - uses: actions/setup-go@v5
  27. with:
  28. go-version: "1.23.x"
  29. - uses: golangci/golangci-lint-action@v6
  30. with:
  31. args: >
  32. --timeout 10m
  33. --exclude-dirs=tests
  34. --disable errcheck
  35. --enable sqlclosecheck,misspell,gofmt,goimports,whitespace,gocritic
  36. - uses: dominikh/staticcheck-action@v1.3.1
  37. with:
  38. version: "2024.1.1"
  39. install-go: false