From 3d015b0c7c06964af006e2681d6bda471e1540fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 6 Dec 2017 21:59:57 +0100 Subject: [PATCH] Style: Min required clang-format version is now 5.0.0 (cherry picked from commit 15c7455abd944704b4cf61beb838238806206b9d) --- community/contributing/code_style_guidelines.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/community/contributing/code_style_guidelines.rst b/community/contributing/code_style_guidelines.rst index f952a0a6e..5a5d1148d 100644 --- a/community/contributing/code_style_guidelines.rst +++ b/community/contributing/code_style_guidelines.rst @@ -51,8 +51,9 @@ Using clang-format locally ~~~~~~~~~~~~~~~~~~~~~~~~~~ First of all, you will need to install clang-format. As of now, you need to use -either clang-format 3.9.x or 4.x to be compatible with Godot's format. The -upcoming 5.x branch changed the syntax for Obj-C and will error out. +**clang-format 5.x** to be compatible with Godot's format. The upcoming 6.x +branch has not been tested yet and my cause inconsistencies; the previous 3.x +branch is incompatible with the style definitions and will error out. Installation ^^^^^^^^^^^^ @@ -60,7 +61,10 @@ Installation Here's how to install clang-format: - Linux: It will usually be available out-of-the-box with the clang toolchain - packaged by your distribution. + packaged by your distribution. If your distro version is not the required one, + you can download a pre-compiled version from the + `LLVM website `__, or if you are on + a Debian derivative, use the `upstream repos `__. - macOS and Windows: You can download precompiled binaries from the `LLVM website `_. You may need to add the path to the binary's folder to your system's ``PATH`` environment @@ -99,7 +103,7 @@ This "hook" is a script which can be found in ``misc/hooks``, refer to that folder's README.md for installation instructions. If your clang-format is not in the ``PATH``, you may have to edit the -``pre-commit-clang-format`` to point to the correct binary for it work. +``pre-commit-clang-format`` to point to the correct binary for it to work. The hook was tested on Linux and macOS, but should also work in the Git Shell on Windows.