Skip to content
David Tolnay edited this page Jul 12, 2015 · 2 revisions

This page gives suggestions for working on a contribution to jq. These do not apply if you are writing code in the jq language itself.

Make

Use make -j4 and make check -j4 to build and run unit tests in parallel. For make, a different number of jobs may be even faster than -j4 on your computer. For make check, the tests are currently split four ways so a number of jobs higher than -j4 will not help.

GDB

Install jq-gdb to pretty-print jv objects while using gdb to debug jq or other projects using libjq.

Valgrind

The tests run by make check can be much slower in Valgrind compared to without Valgrind. While iterating on code and running tests frequently, use ./configure --disable-valgrind to make the tests run about 50x faster (2 seconds instead of 2 minutes). When you are ready to start tracking down memory leaks, run ./configure to re-enable Valgrind.

Clone this wiki locally