Coding Guideline
Contents
C++ Coding Guideline
Follow Google style for C++, with two exceptions:
Each line of text may contain up to 100 characters.
The use of C++ exceptions is allowed.
Use C++17 features such as smart pointers, braced initializers, lambda functions, and
std::thread.Use Doxygen to document all the interface code.
We have some comments around symbols imported by headers, some of those are hinted by include-what-you-use. It’s not required.
We use clang-tidy. Its configuration lives in the root directory of the XGBoost source tree.
We have a series of automatic checks to ensure that all of our codebase complies with the Google style. Before submitting your pull request, you are encouraged to run the style checks on your machine. See R Coding Guideline.
Python Coding Guideline
Follow . We use Pylint to automatically enforce PEP 8 style across our Python codebase. Before submitting your pull request, you are encouraged to run Pylint on your machine. See .