CONTRIBUTING: little changes (#4141)
This commit is contained in:
parent
1e8464c1d4
commit
b8cd3af21f
1 changed files with 14 additions and 11 deletions
25
.github/CONTRIBUTING.md
vendored
25
.github/CONTRIBUTING.md
vendored
|
@ -29,7 +29,7 @@ https://www.visualstudio.com/) the best tool for the job.
|
||||||
[](https://gitter.im/Cockatrice/Cockatrice)
|
[](https://gitter.im/Cockatrice/Cockatrice)
|
||||||
|
|
||||||
If you'd like to ask questions, get advice, or just want to say hi,
|
If you'd like to ask questions, get advice, or just want to say hi,
|
||||||
The Cockatrice Development Team uses [Discord](https://discord.gg/ZASRzKu)
|
the Cockatrice Development Team uses [Discord](https://discord.gg/ZASRzKu)
|
||||||
for communications in the #dev channel. If you're not into Discord, we also
|
for communications in the #dev channel. If you're not into Discord, we also
|
||||||
have a [Gitter](https://gitter.im/Cockatrice/Cockatrice) channel available,
|
have a [Gitter](https://gitter.im/Cockatrice/Cockatrice) channel available,
|
||||||
albeit slightly less active.
|
albeit slightly less active.
|
||||||
|
@ -37,12 +37,13 @@ albeit slightly less active.
|
||||||
|
|
||||||
# Code Style Guide #
|
# Code Style Guide #
|
||||||
|
|
||||||
### Formatting and continuous integration (ci) ###
|
### Formatting and continuous integration (CI) ###
|
||||||
|
|
||||||
We use a separate job on Travis CI to check your code for formatting issues, if
|
We use a separate job on Travis CI to check your code for formatting issues. If
|
||||||
your pull request was rejected you can check the output on their website.
|
your pull request was rejected, you can check the output on their website.
|
||||||
Click on "Details" next to the failed Travis CI build and then click on the
|
To do so, click on <kbd>Details</kbd> next to the failed Travis CI build at the
|
||||||
Linting build (the fastest one) to see the log.
|
bottom of your PR on the GitHub page, on the Travis page then click on our "Linting"
|
||||||
|
build (the fastest one on the very top of the list) to see the complete log.
|
||||||
|
|
||||||
The message will look like this:
|
The message will look like this:
|
||||||
```
|
```
|
||||||
|
@ -58,8 +59,9 @@ The message will look like this:
|
||||||
*** ***
|
*** ***
|
||||||
***********************************************************
|
***********************************************************
|
||||||
```
|
```
|
||||||
The CONTRIBUTING.md file mentioned is this file. Please read [this section](
|
The CONTRIBUTING.md file mentioned in that message is the file you are currently
|
||||||
#formatting) for full information on our formatting guidelines.
|
reading. Please see [this section](#formatting) below for full information on our
|
||||||
|
formatting guidelines.
|
||||||
|
|
||||||
### Compatibility ###
|
### Compatibility ###
|
||||||
|
|
||||||
|
@ -70,7 +72,7 @@ to help convert it over!
|
||||||
For consistency, we use Qt data structures where possible. For example,
|
For consistency, we use Qt data structures where possible. For example,
|
||||||
`QString` over `std::string` and `QList` over `std::vector`.
|
`QString` over `std::string` and `QList` over `std::vector`.
|
||||||
|
|
||||||
Do not use old c style casts in new code, instead use a [`static_cast<>`](
|
Do not use old C style casts in new code, instead use a [`static_cast<>`](
|
||||||
https://en.cppreference.com/w/cpp/language/static_cast)
|
https://en.cppreference.com/w/cpp/language/static_cast)
|
||||||
or other appropriate conversion.
|
or other appropriate conversion.
|
||||||
|
|
||||||
|
@ -85,7 +87,7 @@ format all files in your pr in one go. Use `./clangify.sh --help` to show a
|
||||||
full help page.
|
full help page.
|
||||||
|
|
||||||
To run clang-format on a single source file simply use the command
|
To run clang-format on a single source file simply use the command
|
||||||
`clang-format -i <filename>` to format it in place. (some systems install
|
`clang-format -i <filename>` to format it in place. (Some systems install
|
||||||
clang-format with a specific version number appended,
|
clang-format with a specific version number appended,
|
||||||
`find /usr/bin -name clang-format*` should find it for you)
|
`find /usr/bin -name clang-format*` should find it for you)
|
||||||
|
|
||||||
|
@ -102,7 +104,8 @@ Use header guards in the form of `FILE_NAME_H`.
|
||||||
Simple functions, such as getters, may be written inline in the header file,
|
Simple functions, such as getters, may be written inline in the header file,
|
||||||
but other functions should be written in the source file.
|
but other functions should be written in the source file.
|
||||||
|
|
||||||
Group library includes after project includes, and in alphabetic order. Like this:
|
Group project includes first, followed by library includes. All in alphabetic order.
|
||||||
|
Like this:
|
||||||
```c++
|
```c++
|
||||||
// Good
|
// Good
|
||||||
#include "card.h"
|
#include "card.h"
|
||||||
|
|
Loading…
Reference in a new issue