FIx shared structs + add better debugging/linting (#379)

* fix: Fixes issues w/ shared pointers to structs (#378)
* feat: Adds even better debugging and linting support (#376)

This is a #PATCH release.
This commit is contained in:
Harrison (Harry) Cramer
2024-09-16 17:06:40 -04:00
committed by GitHub
parent c3d7f26e3c
commit 5c9b88db4f
31 changed files with 191 additions and 155 deletions

View File

@@ -31,11 +31,12 @@ If you are making changes to the Go codebase, don't forget to run `make compile`
3. Apply formatters and linters to your changes
For changes to the Go codebase: We use <a href="https://pkg.go.dev/cmd/gofmt">gofmt</a> to check formatting and <a href="https://github.com/golangci/golangci-lint">golangci-lint</a> to check linting. Run these commands in the root of the repository:
For changes to the Go codebase: We use <a href="https://pkg.go.dev/cmd/gofmt">gofmt</a> to check formatting and <a href="https://github.com/golangci/golangci-lint">golangci-lint</a> to check linting, and <a href="https://staticcheck.dev/">staticcheck</a>. Run these commands in the root of the repository:
```bash
$ go fmt ./...
$ golangci-lint run
$ golangci-lint run ./...
$ staticcheck ./...
```
If you are writing tests and have added something to the Go client, you can test with:

View File

@@ -12,14 +12,18 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.23.1'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
version: v1.61.0
only-new-issues: true
skip-cache: true
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@2024.1.1
- name: Run staticcheck
run: staticcheck ./...
go_test:
name: Test Go 🧪
needs: [go_lint]