linters.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. - run: "go vet ./..."
  30. - uses: golangci/golangci-lint-action@v6
  31. with:
  32. args: >
  33. --timeout 10m
  34. --exclude-dirs=tests
  35. --disable errcheck
  36. --enable sqlclosecheck,misspell,gofmt,goimports,whitespace,gocritic
  37. - uses: dominikh/staticcheck-action@v1.3.1
  38. with:
  39. version: "2024.1.1"
  40. install-go: false