docs: CONTRIBUTING updated

This commit is contained in:
Mateusz Pusz
2022-03-18 14:39:22 +01:00
parent f56e3bc0da
commit e09de55291

View File

@ -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