Skip to content

Contributing

jonny-novikov edited this page Mar 29, 2016 · 1 revision

The NSpectator test suite is written in NUnit. The test project is NSpectator.Specs. It describes the library itself. Not to be confused with SampleSpecs which hosts numerous tests written with Specs, some of which are intended to fail.

If you have Resharper there is a team-shared settings file in the repository. Please use the settings to format any new code you write.

Fork the project, make your changes, and then send a Pull Request.

Branch housekeeping

If you are a direct contributor to the project, please keep an eye on your past development or features branches and think about archiving them once they're no longer needed. No worries, their commits will still be available under named tags, it's just that they will not pollute the branch list.

If you're running on a Windows OS, there's a batch script available at scripts\archive-branch.bat. Otherwise, the command sequence to run in a *nix shell is the following:

# Get local branch from remote, if needed
git checkout <your-branch-name>

# Go back to master
git checkout master

# Create local tag
git tag archive/<your-branch-name> <your-branch-name>

# Create remote tag
git push origin archive/<your-branch-name>

# Delete local branch
git branch -d <your-branch-name>

# Delete remote branch
git push origin --delete <your-branch-name>

If you need to later retrieve an archived branch, just run the following commands:

# Checkout archive tag
git checkout archive/<your-branch-name>

# (Re)Create branch
git checkout -b <some-branch-name>