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