I can't speak for himself, but BSDs, especially NetBSD and OpenBSD are known for their code quality. Quoting from "What is NetBSD?"[1]: "The basic features of NetBSD are: Code quality and correctness ...".
While you are only doing as chj asks, I would point out that NetBSD and OpenBSD have the advantage of being exceedingly compact, simple, have fewer features, fewer contributors, and generally travel at a slower development pace.
Define code quality: braindead GNU extensions such as nested functions - Linux uses that, How about the separation of DM and MD due to ego's, how every driver without a lib (such as libata) warranting a few exceptions has to rewrite boilerplate for basic things - frame buffer drivers are a good example. How about the syscall bugs - look into glibc if you feel like gouging your eyes out or jemalloc for more tame code. Linux itself is more an ecosystem of code and not a single project some parts are good while others are very very bad.