lidavidm commented on a change in pull request #12085: URL: https://github.com/apache/arrow/pull/12085#discussion_r780580313
########## File path: docs/source/developers/cpp/development.rst ########## @@ -92,32 +92,65 @@ Address Sanitizer and Undefined Behavior Sanitizer to check for various patterns of misbehaviour such as memory leaks. In addition, the codebase is subjected to a number of code style and code cleanliness checks. -In order to have a passing CI build, your modified git branch must pass the +In order to have a passing CI build, your modified Git branch must pass the following checks: * C++ builds with the project's active version of ``clang`` without compiler warnings with ``-DBUILD_WARNING_LEVEL=CHECKIN``. Note that there are classes of warnings (such as ``-Wdocumentation``, see more on this below) that are not caught by ``gcc``. +* Passes various C++ (and others) style checks, checked with the ``lint`` + subcommand to :ref:`Archery <archery>`. This can also be fixed locally + by running ``archery lint --cpplint --clang-format --clang-tidy --fix``. * CMake files pass style checks, can be fixed by running ``archery lint --cmake-format --fix``. This requires Python 3 and `cmake_format <https://github.com/cheshirekow/cmake_format>`_ (note: - this currently does not work on Windows) -* Passes various C++ (and others) style checks, checked with the ``lint`` - subcommand to :ref:`Archery <archery>`. This can also be fixed locally - by running ``archery lint --cpplint --fix``. + this currently does not work on Windows). + +On pull requests, the "Dev / Lint" pipeline will run these checks, and report +what files/lines need to be fixed, if any. + +In order to account for variations in the behavior of ``clang-format`` between +major versions of LLVM, we pin the version of ``clang-format`` used. You can +confirm the current pinned version by finding the ``CLANG_TOOLS`` variable +value in `.env <https://github.com/apache/arrow/blob/master/.env>`_. Note that +the version must match exactly; a newer version (even a patch release) will +not work. LLVM can be installed through a system package manager or a package +manager like Conda or Homebrew, though note they may not offer the exact +version needed. Alternatively, binaries can be directly downloaded from the +`LLVM website <https://releases.llvm.org/>`_. + +For convenience, C++ style checks can run via a build, in addition to +Archery. To do so, build one or more of the targets ``format`` (for +clang-format), ``lint_cpp_cli``, ``lint`` (for cpplint), or +``clang-tidy``. For example:: Review comment: Hmm, I don't actually use this configuration + there are quite a few IDEs we could talk about; maybe we could add an IDE setup page in the future for this sort of information? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org