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
|
2023-11-25 05:35:08 +01:00
|
|
|
workflow_dispatch:
|
2021-03-23 05:04:10 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
jshint:
|
|
|
|
name: Javascript Linter
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 00:35:18 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-03-11 04:52:56 +01:00
|
|
|
- name: Install linters
|
2021-03-23 05:04:10 +01:00
|
|
|
run: |
|
2024-03-11 04:52:56 +01:00
|
|
|
sudo npm install -g jshint@2.13.6 eslint@8.57.0
|
2021-03-23 05:04:10 +01:00
|
|
|
- name: Run jshint
|
2024-03-11 04:32:39 +01:00
|
|
|
run: jshint internal/ui/static/js/*.js
|
2024-03-11 04:52:56 +01:00
|
|
|
- name: Run ESLint
|
|
|
|
run: eslint internal/ui/static/js/*.js
|
2021-03-23 05:04:10 +01:00
|
|
|
|
|
|
|
golangci:
|
2024-03-17 21:26:51 +01:00
|
|
|
name: Golang Linters
|
2021-03-23 05:04:10 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 00:35:18 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-11 23:21:48 +01:00
|
|
|
- uses: actions/setup-go@v5
|
2021-03-23 05:04:10 +01:00
|
|
|
with:
|
2024-03-10 19:59:31 +01:00
|
|
|
go-version: "1.22.x"
|
2024-02-25 05:44:40 +01:00
|
|
|
- run: "go vet ./..."
|
2024-05-14 00:40:17 +02:00
|
|
|
- uses: golangci/golangci-lint-action@v6
|
2021-03-23 05:04:10 +01:00
|
|
|
with:
|
2024-03-17 21:26:51 +01:00
|
|
|
args: --timeout 10m --skip-dirs tests --disable errcheck --enable sqlclosecheck --enable misspell --enable gofmt --enable goimports --enable whitespace --enable gocritic
|
2024-03-25 23:25:26 +01:00
|
|
|
- uses: dominikh/staticcheck-action@v1.3.1
|
2024-02-25 05:44:40 +01:00
|
|
|
with:
|
|
|
|
version: "2023.1.7"
|
|
|
|
install-go: false
|