mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Update Github templates
This commit is contained in:
parent
a90a577ee1
commit
4aab93084a
64
.github/CONTRIBUTING.md
vendored
64
.github/CONTRIBUTING.md
vendored
@ -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
|
* **master** – points to the latest public release
|
||||||
* **develop** – points to the development of the next release, contains tested and reviewed code
|
* **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)
|
* **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
|
### 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…")
|
* Use the imperative mood ("Move cursor to…" not "Moves cursor to…")
|
||||||
* Limit the first line to 72 characters or less
|
* Limit the first line to 72 characters or less
|
||||||
* Reference issues and pull requests liberally
|
* Reference issues and pull requests liberally
|
||||||
* If your pull request fixes an existing issue, add "…, resolves #ISSUENUMBER" to your main commit
|
* If your pull request fixes an existing issue, add "Fixes #ISSUENUMBER" to your pull request description
|
||||||
* When only changing documentation, include `[ci skip]` in the commit description
|
|
||||||
|
|
||||||
### Coding styleguide
|
### 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 **C++ files** (*.cpp .h*): 4 spaces
|
||||||
For **Qt-UI files** (*.ui*): 2 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
|
```c
|
||||||
int* count;
|
int* count;
|
||||||
|
const QString& string;
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Braces
|
#### Braces
|
||||||
```c
|
```c
|
||||||
if (condition) {
|
if (condition) {
|
||||||
doSomething();
|
doSomething();
|
||||||
|
} else {
|
||||||
|
doSomethingElse();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExampleClass::exampleFunction()
|
void ExampleClass::exampleFunction()
|
||||||
@ -144,15 +195,18 @@ void ExampleClass::exampleFunction()
|
|||||||
|
|
||||||
#### Switch statement
|
#### Switch statement
|
||||||
```c
|
```c
|
||||||
|
// Note: avoid declaring variables in a switch statement
|
||||||
switch (a) {
|
switch (a) {
|
||||||
case 1:
|
case 1:
|
||||||
doSomething();
|
doSomething();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
// Note: use braces if necessary
|
||||||
|
default: {
|
||||||
doSomethingElse();
|
doSomethingElse();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Member variables
|
#### Member variables
|
||||||
|
31
.github/ISSUE_TEMPLATE.md
vendored
31
.github/ISSUE_TEMPLATE.md
vendored
@ -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
|
## Expected Behavior
|
||||||
<!--- If you're describing a bug, tell us what should happen -->
|
[NOTE]: # ( 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 suggesting a change/improvement, tell us how it should work )
|
||||||
|
|
||||||
|
|
||||||
## Current Behavior
|
## Current Behavior
|
||||||
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
|
[NOTE]: # ( 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 suggesting a change/improvement, explain the difference from the current behavior )
|
||||||
|
|
||||||
|
|
||||||
## Possible Solution
|
## Possible Solution
|
||||||
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
|
[NOTE]: # ( Not required, but suggest a fix/reason for the bug, )
|
||||||
<!--- or ideas how to implement the addition or change -->
|
[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 -->
|
## Steps to Reproduce
|
||||||
<!--- reproduce this bug. Include code to reproduce, if relevant -->
|
[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.
|
1.
|
||||||
2.
|
2.
|
||||||
3.
|
3.
|
||||||
4.
|
|
||||||
|
|
||||||
## Context
|
## Context
|
||||||
<!--- How has this issue affected you? What are you trying to accomplish? -->
|
[NOTE]: # ( 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]: # ( Providing context helps us come up with a solution that is most useful in the real world )
|
||||||
|
|
||||||
|
|
||||||
## Debug Info
|
## Debug Info
|
||||||
<!--- Paste debug info from Help → About here -->
|
[NOTE]: # ( Paste debug info from Help → About here )
|
||||||
KeePassXC - VERSION
|
KeePassXC - VERSION
|
||||||
Revision: REVISION
|
Revision: REVISION
|
||||||
|
|
||||||
|
48
.github/PULL_REQUEST_TEMPLATE.md
vendored
48
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -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
|
## Type of change
|
||||||
<!--- Describe your changes in detail -->
|
[NOTE]: # ( Please remove all lines which don't apply. )
|
||||||
|
|
||||||
## 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. -->
|
|
||||||
- ✅ Bug fix (non-breaking change which fixes an issue)
|
- ✅ Bug fix (non-breaking change which fixes an issue)
|
||||||
|
- ✅ Refactor (significant modification to existing code)
|
||||||
- ✅ New feature (non-breaking change which adds functionality)
|
- ✅ New feature (non-breaking change which adds functionality)
|
||||||
- ✅ Breaking change (fix or feature that would cause existing functionality to change)
|
- ✅ 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:
|
## Checklist:
|
||||||
<!--- Please go over all the following points. -->
|
[NOTE]: # ( Please go over all the following points. )
|
||||||
<!--- Again, remove any lines which don't apply. -->
|
[NOTE]: # ( Again, remove any lines which don't apply. )
|
||||||
<!--- Pull Requests that don't fulfill all [REQUIRED] requisites are likely -->
|
[NOTE]: # ( Pull Requests that don't fulfill all [REQUIRED] requisites are likely )
|
||||||
<!--- to be sent back to you for correction or will be rejected. -->
|
[NOTE]: # ( to be sent back to you for correction or will be rejected. )
|
||||||
- ✅ I have read the **CONTRIBUTING** document. **[REQUIRED]**
|
- ✅ I have read the **CONTRIBUTING** document. **[REQUIRED]**
|
||||||
- ✅ My code follows the code style of this project. **[REQUIRED]**
|
- ✅ My code follows the code style of this project. **[REQUIRED]**
|
||||||
- ✅ All new and existing tests passed. **[REQUIRED]**
|
- ✅ All new and existing tests passed. **[REQUIRED]**
|
||||||
- ✅ I have compiled and verified my code with `-DWITH_ASAN=ON`. **[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.
|
- ✅ I have added tests to cover my changes.
|
||||||
|
Loading…
Reference in New Issue
Block a user