-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EN-12514: github community standards #4319
Conversation
|
||
## Use development branch | ||
|
||
External contributions should happen against the `development` branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
.github/CONTRIBUTING.md
Outdated
## Use linter | ||
|
||
Make sure the code is well-formatted and aligned before opening a PR. Some linters such `gofmt` can be used, or code style | ||
can be proactively checked while written code when using an IDE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
writing? + comma before when
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
.github/CONTRIBUTING.md
Outdated
## Writing tests | ||
|
||
In case of adding a new feature, make sure you follow these guidelines: | ||
- Attempt to write some unit tests which verify the component in isolation and mock the external components around it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start all list entries with lower case, end them with ;
except the last one which ends with .
Valid for all lists
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
.github/CONTRIBUTING.md
Outdated
|
||
In case of adding a new feature, make sure you follow these guidelines: | ||
- Attempt to write some unit tests which verify the component in isolation and mock the external components around it | ||
- If the component relies on many other external components which are difficult to mock, write integrations tests for it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add:
Although, this usually means that further decoupling using interfaces is required. Also, the component might needed to be split in smaller, specialized sub-components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
- Try to first write the unit test that exposes the bug, then fix it and have a test that will make sure the specific situation will always be tested in the future | ||
|
||
In both cases, make sure that the new code has a good code coverage (ideally, 100% of the new lines are covered) and also try to cover edge-cases. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add:
Please take care of the severity of the bug. Pushing directly a fix of an undiscovered, critical bug or a bug that can be exploited in such a way that could create damage to the blockchain, loss of funds, state alteration beyond repair, and so on, can be exploited before the team can take any action. Please contact the team on private channels before pushing the fix if you have any doubts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/ElrondNetwork/elrond-go/blob/main/.github/CODE_OF_CONDUCT.md) | ||
options: | ||
- label: I agree to follow this project's Code of Conduct | ||
required: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also add the version. Something like: v1.3.35.0-0-gfc78258fe/go1.17.6/linux-amd64
and the Host: DO, AWS, Contabo, no VPS (if you run your validator on a physical machine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
.github/CONTRIBUTING.md
Outdated
## Writing tests | ||
|
||
In case of adding a new feature, make sure you follow these guidelines: | ||
- Attempt to write some unit tests which verify the component in isolation and mock the external components around it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write unit tests which.... remove attempt and some
also two lines down
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
.github/CONTRIBUTING.md
Outdated
In case of adding a new feature, make sure you follow these guidelines: | ||
- Attempt to write some unit tests which verify the component in isolation and mock the external components around it | ||
- If the component relies on many other external components which are difficult to mock, write integrations tests for it | ||
- Try to cover both expected functionality but also verify that the code fails in expected ways |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove try to: Cover both expected functionality...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Codecov Report
@@ Coverage Diff @@
## master #4319 +/- ##
=======================================
Coverage 70.90% 70.90%
=======================================
Files 618 618
Lines 82471 82471
=======================================
+ Hits 58478 58480 +2
+ Misses 19765 19764 -1
+ Partials 4228 4227 -1
Continue to review full report at Codecov.
|
added code of conduct, PR template, contributing guide, and also refactored issue templates