From e09de55291221f13cab0ec2623cb670d17eff6a5 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Fri, 18 Mar 2022 14:39:22 +0100 Subject: [PATCH] docs: CONTRIBUTING updated --- CONTRIBUTING.md | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9c841ed3..51c57420 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,8 @@ below or prefix any `mp-units` URL (main branch, other branches, issues, PRs, .. ## Download, Build, Install -Alternatively, please refer to our official docs for [download, build, and install instructions](https://mpusz.github.io/units/usage.html) if you want to setup a development environment on your local machine. +Alternatively, please refer to our official docs for [download, build, and install instructions](https://mpusz.github.io/units/usage.html) +if you want to setup a development environment on your local machine. ## Where to start? @@ -22,16 +23,26 @@ If you are looking for a good issue to start with, please check the following: - [help wanted](https://github.com/mpusz/units/labels/help%20wanted) - issues that typically are a bit more involved than beginner issues. - [high priority](https://github.com/mpusz/units/labels/high%20priority) - things to fix ASAP but often of higher complexity. -## Code Formatting +## Naming Conventions -We intend to use `clang-format` when it finally learns what a C++ concept is :wink:. +Here are the main rules for naming things in this repo: -Until then, please code alike what is there already: - -- 2 spaces for indentation -- no indentation for namespaces - types, functions, variables naming in a `standard_case` - template parameters in a `PascalCase` +- C++20 concepts names for now in a `PascalCase` but we plan to change it (see https://github.com/mpusz/units/issues/93 for more details) + +## Code Formatting + +Please use `clang-format-15` for code formatting with the `.clang-format` file provided in the repo. + +If you are unable to install or use `clang-format-15`, here are the main rules to follow: + +- LF line endings +- 2 spaces for indentation + - `requires` clause indented with 2 spaces as well +- no indentation for namespaces +- function opening brace in the new line + - all other opening braces attached to the current context at the end of the same line ## Backward Compatibility