Porcupine uses the standard Go toolchain for development.
You can run the tests with:
go test ./...
Some of the tests generate visualizations which must be manually inspected. To make the tests print the path to the generated HTML files, run the tests with the -v
flag.
You can run the Go code formatter with:
go fmt ./...
Additionally, this project uses Prettier to format HTML, CSS, and JavaScript files. You can run Prettier (using npx) with:
npx prettier -w '**/*.{html,css,js}'
You can run Go's built-in vet
tool with:
go vet ./...
This project additionally uses the staticcheck tool. You can install it with:
go install honnef.co/go/tools/cmd/staticcheck@latest
You can run staticcheck with:
staticcheck -f stylish ./...
Testing and static analysis is run in CI.