forked from microsoft/dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 88feff4
Showing
3 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# How to contribute | ||
|
||
We welcome contributions! However, we do have some requests on how contributions | ||
should be done. Please read them in order to avoid surprises down the road. | ||
|
||
## Choosing something to work on | ||
|
||
The issue tracker of each project has a list of items that you can start | ||
working on: | ||
|
||
* **Features**. Those are issues marked as 'enhancement'. | ||
|
||
* **Bugs**. Those are issues marked as 'bug'. | ||
|
||
In order to avoid overlap, it's always a good idea to comment on the item and | ||
let everybody know that you want to work on it. | ||
|
||
## Creating a pull request | ||
|
||
1. Make sure that there is a corresponding issue for your change first. If there | ||
is none, create one. | ||
2. Create a fork in GitHub | ||
3. Create a branch off the `master` branch. Name it something that that makes | ||
sense, such as `issue-123`. | ||
4. Commit your changes and push your changes to GitHub | ||
5. Create a pull request against our `master` branch | ||
|
||
## DOs and DON'Ts | ||
|
||
* **DO** follow our coding style (see below) | ||
* **DON'T** surprise us with big pull requests. Instead, file an issue and start | ||
a discussion so we can agree on a direction before you invest a large amount | ||
of time. | ||
* **DO** include tests when adding new features. When fixing bugs, start with | ||
adding a test that highlights how the current behavior is broken. | ||
* **DO** keep the discussions focused. When a new or related topic comes up | ||
it's often better to create new issue than to side track the discussion. | ||
|
||
## C# Coding Style | ||
|
||
The general rule we follow is "use Visual Studio defaults". | ||
|
||
1. We use Allman style braces | ||
2. We use four spaces of indentation (no tabs) | ||
3. We use "_camelCase" private members and use "readonly" where possible | ||
4. We avoid `this.` unless absolutely necessary | ||
5. We always specify the visiblity, even if it's the default (i.e. | ||
`private string _foo` not `string _foo`) | ||
6. Namespace imports should be specified at the top of the file, *outside* of | ||
`namespace` declarations and should be sorted alphabetically, with `System.` | ||
namespaces at the top and blank lines between different top level groups | ||
|
||
### Example File: | ||
|
||
```C# | ||
using System.Aardvarks; | ||
using System.IO; | ||
using System.Zebras; | ||
|
||
using Microsoft.CoolStuff; | ||
using Microsoft.CoolStuff.Build; | ||
|
||
using Zebra.Crossing; | ||
|
||
namespace System.More.AndMore | ||
{ | ||
public class MyClass | ||
{ | ||
private readonly IAbstraction _something; | ||
|
||
public MyClass(IAbstraction something) | ||
{ | ||
_something = something; | ||
} | ||
|
||
public IAbstraction SomethingService | ||
{ | ||
get { return _something; } | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
Copyright (c) 2014 Microsoft Corporation | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# .NET Home | ||
|
||
The repository is the starting point for people to learn about the .NET open | ||
source projects. | ||
|
||
## Contributing | ||
|
||
See [Contributing Guide](CONTRIBUTING.md). | ||
|
||
## License | ||
|
||
All [.NET projects](https://github.com/Microsoft?query=dotnet) are licensed | ||
under the [MIT License](LICENSE). | ||
|
||
## Feedback | ||
|
||
Check out the [Contributing Guide](CONTRIBUTING.md) to see the best places to | ||
log issues and start discussions. |