Update Github templates

This commit is contained in:
Jonathan White 2018-11-14 14:17:13 -05:00
parent a90a577ee1
commit 4aab93084a
3 changed files with 101 additions and 42 deletions

View File

@ -94,7 +94,7 @@ The Branch Strategy is based on [git-flow-lite](http://nvie.com/posts/a-successf
* **master** points to the latest public release
* **develop** points to the development of the next release, contains tested and reviewed code
* **feature/**[name] points to a branch with a new feature, one which is candidate for merge into develop (subject to rebase)
* **hotfix/**[id]-[description] points to a branch with a fix for a particular issue ID
* **hotfix/**[name] points to a branch with a fix for a particular issue ID
### Git commit messages
@ -103,8 +103,7 @@ The Branch Strategy is based on [git-flow-lite](http://nvie.com/posts/a-successf
* Use the imperative mood ("Move cursor to…" not "Moves cursor to…")
* Limit the first line to 72 characters or less
* Reference issues and pull requests liberally
* If your pull request fixes an existing issue, add "…, resolves #ISSUENUMBER" to your main commit
* When only changing documentation, include `[ci skip]` in the commit description
* If your pull request fixes an existing issue, add "Fixes #ISSUENUMBER" to your pull request description
### Coding styleguide
@ -125,15 +124,67 @@ For names made of multiple concatenated words, the first letter of the whole is
For **C++ files** (*.cpp .h*): 4 spaces
For **Qt-UI files** (*.ui*): 2 spaces
#### Pointers
#### Includes
```c
// Class includes
#include "MyWidget.h"
#include "ui_MyWidget.h"
// Global includes
#include <QWidget>
#include <stdin>
// Application includes
#include "core/Config.h"
#include "core/FilePath.h"
```
#### Classes
```c
// Note: order is important, stay organized!
class MyWidget : public QWidget
{
Q_OBJECT
public:
explicit MyWidget(QWidget* parent);
~MyWidget() override;
signals:
void alert();
public slots:
void processEvent(Event* event);
private slots:
void myEvent(Event* event);
private:
const QScopedPointer<Ui::MyWidget> m_ui;
int m_counter;
};
// Note: alignment of variable initialization
MyWidget::MyWidget(QWidget* parent)
: QWidget(parent)
, m_ui(new Ui::MyWidget())
{
}
```
#### Pointers / References
```c
int* count;
const QString& string;
```
#### Braces
```c
if (condition) {
doSomething();
} else {
doSomethingElse();
}
void ExampleClass::exampleFunction()
@ -144,15 +195,18 @@ void ExampleClass::exampleFunction()
#### Switch statement
```c
// Note: avoid declaring variables in a switch statement
switch (a) {
case 1:
doSomething();
break;
default:
// Note: use braces if necessary
default: {
doSomethingElse();
break;
}
}
```
#### Member variables

View File

@ -1,31 +1,34 @@
<!--- Provide a general summary of the issue in the title above -->
[TIP]: # ( Provide a general summary of the issue in the title above ^^ )
## Expected Behavior
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->
[NOTE]: # ( If you're describing a bug, tell us what should happen )
[NOTE]: # ( If you're suggesting a change/improvement, tell us how it should work )
## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from the current behavior -->
[NOTE]: # ( If describing a bug, tell us what happens instead of the expected behavior )
[NOTE]: # ( If suggesting a change/improvement, explain the difference from the current behavior )
## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->
[NOTE]: # ( Not required, but suggest a fix/reason for the bug, )
[NOTE]: # ( or ideas how to implement the addition or change )
## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
## Steps to Reproduce
[NOTE]: # ( Provide a link to a live example, or an unambiguous set of steps to )
[NOTE]: # ( reproduce this bug. Include code to reproduce, if relevant )
1.
2.
3.
4.
## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
[NOTE]: # ( How has this issue affected you? What are you trying to accomplish? )
[NOTE]: # ( Providing context helps us come up with a solution that is most useful in the real world )
## Debug Info
<!--- Paste debug info from Help → About here -->
[NOTE]: # ( Paste debug info from Help → About here )
KeePassXC - VERSION
Revision: REVISION

View File

@ -1,34 +1,36 @@
<!--- Provide a general summary of your changes in the title above -->
[TIP]: # ( Provide a general summary of your changes in the title above ^^ )
## Description
<!--- Describe your changes in detail -->
## Motivation and context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
## How has this been tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
## Screenshots (if appropriate):
## Types of changes
<!--- What types of changes does your code introduce? -->
<!--- Please remove all lines which don't apply. -->
## Type of change
[NOTE]: # ( Please remove all lines which don't apply. )
- ✅ Bug fix (non-breaking change which fixes an issue)
- ✅ Refactor (significant modification to existing code)
- ✅ New feature (non-breaking change which adds functionality)
- ✅ Breaking change (fix or feature that would cause existing functionality to change)
- ✅ Documentation (non-code change)
## Description and Context
[NOTE]: # ( Describe your changes in detail, why is this change required? )
[NOTE]: # ( Describe the context of your change. Explain large code modifications. )
[NOTE]: # ( If it fixes an open issue, please add "Fixes #XXX" as necessary )
## Screenshots
[TIP]: # ( Do not include screenshots of your actual repository! )
## Testing strategy
[NOTE]: # ( Please describe in detail how you tested your changes. )
[TIP]: # ( We expect all new code to be covered by unit tests! )
## Checklist:
<!--- Please go over all the following points. -->
<!--- Again, remove any lines which don't apply. -->
<!--- Pull Requests that don't fulfill all [REQUIRED] requisites are likely -->
<!--- to be sent back to you for correction or will be rejected. -->
[NOTE]: # ( Please go over all the following points. )
[NOTE]: # ( Again, remove any lines which don't apply. )
[NOTE]: # ( Pull Requests that don't fulfill all [REQUIRED] requisites are likely )
[NOTE]: # ( to be sent back to you for correction or will be rejected. )
- ✅ I have read the **CONTRIBUTING** document. **[REQUIRED]**
- ✅ My code follows the code style of this project. **[REQUIRED]**
- ✅ All new and existing tests passed. **[REQUIRED]**
- ✅ I have compiled and verified my code with `-DWITH_ASAN=ON`. **[REQUIRED]**
- ✅ My change requires a change to the documentation and I have updated it accordingly.
- ✅ My change requires a change to the documentation, and I have updated it accordingly.
- ✅ I have added tests to cover my changes.