2021-03-22 21:04:10 -07:00
|
|
|
name: Linters
|
2022-01-19 21:38:54 -08:00
|
|
|
permissions: read-all
|
|
|
|
|
2021-03-22 21:04:10 -07:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2022-08-11 21:17:38 -07:00
|
|
|
- main
|
2021-03-22 21:04:10 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
jshint:
|
|
|
|
name: Javascript Linter
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-08-09 05:07:07 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-03-22 21:04:10 -07:00
|
|
|
- name: Install jshint
|
|
|
|
run: |
|
2022-01-19 21:33:10 -08:00
|
|
|
sudo npm install -g jshint@2.13.3
|
2021-03-22 21:04:10 -07:00
|
|
|
- name: Run jshint
|
|
|
|
run: jshint ui/static/js/*.js
|
|
|
|
|
|
|
|
golangci:
|
|
|
|
name: Golang Linter
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-08-09 05:07:07 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-20 22:59:28 +00:00
|
|
|
- uses: actions/setup-go@v4
|
2021-03-22 21:04:10 -07:00
|
|
|
with:
|
2023-08-08 21:54:09 -07:00
|
|
|
go-version: "1.21"
|
2022-08-09 05:07:13 +00:00
|
|
|
- uses: golangci/golangci-lint-action@v3
|
2021-03-22 21:04:10 -07:00
|
|
|
with:
|
2023-05-09 19:06:36 -07:00
|
|
|
args: --timeout 10m --skip-dirs tests --disable errcheck --enable sqlclosecheck --enable misspell --enable gofmt --enable goimports --enable whitespace
|