linters.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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: --timeout 10m --skip-dirs tests --disable errcheck --enable sqlclosecheck --enable misspell --enable gofmt --enable goimports --enable whitespace --enable gocritic
  33. - uses: dominikh/staticcheck-action@v1.3.1
  34. with:
  35. version: "2024.1.1"
  36. install-go: false