Skip to content

Commit

Permalink
feat: Add staticcheck linting
Browse files Browse the repository at this point in the history
  • Loading branch information
simse committed Sep 13, 2024
1 parent 01a7558 commit b1be799
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PR Checks

on:
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install just
run: |
mkdir -p "$HOME/.local/bin"
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to "$HOME/.local/bin"
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: '^1.13.1'

- name: Run lint
run: just lint
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- main
pull_request:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions internal/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package internal
import (
"github.com/vektah/gqlparser/v2"
"github.com/vektah/gqlparser/v2/ast"
"time"
)
import (
"errors"
Expand Down
2 changes: 2 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ build:
go build -ldflags="-s -w" -o "build/$output" .
done
done

lint: staticcheck ./...

0 comments on commit b1be799

Please sign in to comment.