Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 1.99 KB

File metadata and controls

60 lines (45 loc) · 1.99 KB

Contributing

Thanks for taking a look. LockiDucky is small on purpose — please help keep it that way.

Getting set up

git clone https://github.com/magudb/lockiducky.git
cd lockiducky
make check

You need Go 1.25+. make check runs everything CI runs: formatting, go vet, the race-enabled tests, and a build for linux/amd64 and linux/arm64.

To try your build against a real device you also need the capability, since L2CAP echo uses a raw socket:

make build
sudo setcap cap_net_raw+ep build/lockiducky
./build/lockiducky ping -c 3

lockiducky daemon --verbose --dry-run is the safest way to watch the state machine make decisions without it locking your screen.

What good changes look like

  • Deleting is a contribution. This project has already been through one round of cutting features that did not work; more is welcome.
  • No new dependencies without a strong reason. The whole tree is Cobra, a YAML parser, and golang.org/x/sys. Keeping it that way is a feature.
  • Tests for anything with logic. The pure parts — config parsing, the bar payload, the state file, MAC handling — are all covered and easy to extend. Anything that needs a real Bluetooth adapter is not worth mocking.
  • Do not put a real device address in the repo. Test addresses come from the RFC 7042 documentation range, 00:00:5E:00:53:xx. A Bluetooth address is a stable identifier for hardware someone carries around.
  • gofmt -s, which make fmt applies.

Commits and pull requests

Commit messages follow Conventional Commits (feat:, fix:, docs:, refactor:, chore:) because the release notes are generated from them.

Before opening a PR, run make check and say in the description what you tested on real hardware — the parts that talk to Bluetooth and to a screen locker cannot be covered in CI.

Releasing

Tag and push; GoReleaser does the rest.

git tag -a v0.2.0 -m "v0.2.0"
git push origin v0.2.0