First of all, thank you for wanting to contribute to NFluent! There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
Reported issues are assessed rapidly and fix in a timely manner if identified as important. Note that feedback on error messages are welcomed. When reporting an issue in Git, please fill all present fields. Quality of our response depends on your effort!
- Fork on GitHub
- Make sure your line-endings are configured correctly
- Clone your fork locally
- Configure the upstream repo (
git remote add upstream git://github.com/tpierrain/NFluent
) - Create a local branch (
git checkout -b myBranch
) - Work on your feature, following the NFluent Definition of Done (DoD) for Development.
- Rebase if required (see below)
- Push the branch up to GitHub (
git push origin myBranch
) - Send a Pull Request on GitHub
You should never work on a clone of master, and you should never send a pull request from master - always from a branch. The reasons for this are detailed below.
- Don't forget to install the Project Linker Visual Studio Add-in so that NFluent35 and NFluent 40 projects (same for tests) contain the same elements (adding all your new types in the *35 projects by default if possible, and letting the plugin to add links in the *40 version).
WARNING: (almost) all files are now located within the NFluent.Core project, and the other projects embed file aliases
Since T4 template aren't supported for dotnet core projects, we've setup a hack that allow T4 template to be generated from the T4 located within the NFluent.35 project (which generates files within the proper dotnet core project target location)
While you're working away in your branch it's quite possible that your upstream master (most likely the canonical NFluent version) may be updated. If this happens you should:
- Stash any un-committed changes you need to
git checkout master
git pull upstream master
git checkout myBranch
git rebase master myBranch
git push origin master
- (optional) this this makes sure your remote master is up to date
This ensures that your history is "clean" i.e. you have one branch off from master followed by your changes in a straight line. Failing to do this ends up with several "messy" merges in your history, which we don't want. This is the reason why you should always work in a branch and you should never be working in, or sending pull requests from, master.
If you're working on a long running feature then you may want to do this quite often, rather than run the risk of potential merge issues further down the line.
First of all, check that your code is in line with the NFluent Definition of Done (DoD) for Development.
For NCrunch users, please refers to the NCrunch configuration tips for NFluent contributors.
Then, while working on your feature you may well create several branches, which is fine, but before you send a pull request you should ensure that you have rebased back to a single "Feature branch" - we care about your commits, and we care about your feature branch; but we don't care about how many or which branches you created while you were working on it :-)
When you're ready to go you should confirm that you are up to date and rebased with upstream/master (see "Handling Updates from Upstream/Master" above), and then:
git push origin myBranch
- Send a descriptive Pull Request on GitHub - making sure you have selected the correct branch in the GitHub UI!
This How to contribute
procedure was mostly extracted from the awesome Nancy open source project.
Thanks to them for their inspiration.