Finishing up with style!
Before we wrap this chapter up, I’d be remiss if I didn’t broach one last topic – code style!
To avoid wars and arguments about most aspects of code style, most of the implementations of the Arrow library have very well-defined style checking and linting rules. These rules are checked using the automated CI checks that we covered and are required to pass, in order to merge a PR. We’re not going to spend a ton of time on this, since this is enforced and automated with tooling, but it’s good to know what tooling is in use.
C++ code styling
Arrow follows Google’s C++ style guide (https://google.github.io/styleguide/cppguide.html) with a few exceptions:
- The line length is relaxed to 90 characters.
- The
NULLPTR
macro is used in header files, rather thannullptr
, for wider C++ version build support. - There are relaxed rules regarding structs for convenience.
The style is enforced using the clang...