Contributing
Setup
git clone git@github.com:pinchtab/seaportal.git cd seaportal bash scripts/install-hooks.sh ./dev doctor
Development Workflow
- Create a branch from
main - Make your changes
- Run
./dev check(format, vet, lint, tests) - Commit with a descriptive message
- Open a PR against
main
Commit Messages
Follow conventional commits:
feat:new featurefix:bug fixdocs:documentationci:CI/CD changeschore:maintenance
Testing
./dev test # Unit tests ./dev test race # With race detector ./dev coverage # Coverage report ./dev e2e # E2E tests (requires Docker)
Code Style
gofmtfor formatting (enforced by pre-commit hook)golangci-lintfor linting- Keep functions small and focused
- Tests live next to the code they test
Adding Test Fixtures
See fixtures documentation for how to add HTML test fixtures.