]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Document how to work with ClangFormat (#10468)
authorParamat <paramat@users.noreply.github.com>
Tue, 13 Oct 2020 22:57:46 +0000 (23:57 +0100)
committerGitHub <noreply@github.com>
Tue, 13 Oct 2020 22:57:46 +0000 (23:57 +0100)
To avoid the common misunderstanding where a contributor thinks they
must apply the unsuitable formatting requests ClangFormat makes.

.github/CONTRIBUTING.md

index b234fb283318a7b32909a63ead8de5b94312e7e8..e57ea9f83c10c9a3fe9816f428c1be9b5017f016 100644 (file)
@@ -43,6 +43,14 @@ Contributions are welcome! Here's how you can help:
 4. The code's interfaces are well designed, regardless of other aspects that might need more work in the future.
 5. It uses protocols and formats which include the required compatibility.
 
+### Important note about automated GitHub checks
+
+When you submit a pull request, GitHub automatically runs checks on the Minetest Engine combined with your changes. One of these checks is called 'cpp lint / clang format', which checks code formatting.
+Because formatting for readability requires human judgement this check often fails and often makes unsuitable formatting requests which make code readability worse.
+
+If this check fails, look at the details to check for any clear mistakes and correct those. However you should not apply everything ClangFormat requests, ignore requests that make code readability worse and any other clearly unsuitable requests.
+Discuss with a core developer if in any doubt and for how to progress.
+
 ## Issues
 
 If you experience an issue, we would like to know the details - especially when a stable release is on the way.