Thanks for your interest. This is a small project — issues and PRs are welcome.
# Go 1.25+ (go.mod sets the floor; the toolchain auto-downloads if needed)
pre-commit install # enable the gitleaks secret-scan hookgo test -race ./... # full test suite
gofmt -l . # must print nothing
go vet ./...
golangci-lint run # same config as CI (.golangci.yml)
pre-commit run --all-files # run the gitleaks hook manuallyTable output is asserted byte-for-byte against
internal/render/testdata/*.golden. After an intentional rendering
change:
go test ./internal/render -update # regenerate the goldens
git diff internal/render/testdata/ # eyeball the changeCommit the regenerated goldens together with the rendering change.
.gitattributes marks *.golden -text so Windows checkouts can't
CRLF-convert them — don't remove that rule.
Before tagging a release, exercise the working tree against a real exporter snapshot — this walks the same age → gzip → JSON path a consumer uses:
go build -o mt5-pnl-cli .
./mt5-pnl-cli set-passphrase # the exporter's encryption passphrase
./mt5-pnl-cli accounts --snapshot <path-to-snapshot.json.gz.age>
./mt5-pnl-cli pnl --last 3m --by month --snapshot <path-to-snapshot.json.gz.age>Confirm the accounts table matches your accounts and the staleness
warning behaves (it prints to stderr when the snapshot is older than
--stale-after).
Dependencies are kept current by
Renovate (config:
renovate.json), covering Go modules and GitHub
Actions:
- Actions are pinned to commit SHAs (not mutable tags) for supply-chain integrity; Renovate keeps the SHA and its version comment current.
- Digest, minor, and patch updates auto-merge once CI passes; majors open a PR for review.
Don't hand-bump these versions — let Renovate's PRs flow through.
go run github.com/goreleaser/goreleaser/v2@latest check
go run github.com/goreleaser/goreleaser/v2@latest build --snapshot --clean --single-target
./dist/*/mt5-pnl-cli version # run the actual release artefactReleases are GitHub Releases with attached binaries — no package index, no publish approval gate (simpler than mt5-pnl-exporter's PyPI flow on purpose):
git tag vX.Y.Z && git push origin vX.Y.Z- The tag push triggers
release.yml: GoReleaser builds darwin/linux/windows × amd64/arm64, generateschecksums.txtand a changelog, and publishes the GitHub Release. - Check the Release page; binaries and checksums should be attached.
The binary's version output is injected from the tag via ldflags.
See CLAUDE.md — the canonical reference for coding style,
architectural rules, and gotchas (British/Commonwealth English, the no-config-file and
keychain-only invariants, golden-file workflow, doc-sync rule). It's
loaded automatically by Claude Code but reads as a normal project doc.