Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,26 @@ jobs:
- run: go vet ./imessage/... ./ipc/... ./pkg/bbctl/... ./pkg/dbowner/...
- run: go test ./imessage/... ./ipc/... ./pkg/bbctl/... ./pkg/dbowner/...

lint:
name: Lint (code since v0.1.0)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
# --new-from-rev needs the v0.1.0 tag and the history after it.
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
# Headers only: type-checking the cgo packages needs olm.h and heif.h
# (rustpushgo.h is in the tree), not the built Rust library.
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libolm-dev libheif-dev
- run: go mod tidy -diff
- uses: golangci/golangci-lint-action@v9
with:
version: v2.15.0
args: --new-from-rev=v0.1.0

relay:
name: Relay and extract-key build (macOS)
runs-on: macos-15
Expand Down
17 changes: 17 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: "2"

# CI passes --new-from-rev=v0.1.0, so only code written after the first
# release is checked. The code inherited from the corten-matrix snapshot is
# left as it was, which keeps the diff against the snapshot readable.
linters:
default: standard
settings:
staticcheck:
# golangci-lint's default set, plus QF1008 off: the connector spells
# out embedded fields (attMsg.WrappedMessage.ReplyGuid) on purpose.
checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-QF1008"]

formatters:
enable:
- gofmt
- goimports
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Security problems go through [SECURITY.md](SECURITY.md), not the issue tracker.
- `scripts/macoun-build-linux.sh test` (inside the build image, see
[docs/setup.md](docs/setup.md)) runs the macoun tests. CI runs the same
script.
- CI also runs `golangci-lint` ([.golangci.yml](.golangci.yml)) and
`go mod tidy -diff`. Lint only reports code changed since v0.1.0, so a
corten-matrix file you touch is checked on your lines, not as a whole.

Nothing in the test suite talks to Apple. If your change affects what is sent
to Apple, say in the pull request how you checked it against a real account.
Expand Down
Loading