Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 2.19 KB

CONTRIBUTING.md

File metadata and controls

30 lines (23 loc) · 2.19 KB

This article is not a detailed guide on how to create a pull request (PR). See here to learn more about how to work with pull requests on GitHub.

The purpose of this article is to illustrate the main checklists you must go through before a PR will be considered for inclusion in Farmer. If you are new to Farmer, F# or GitHub - don't worry. The team will be happy to support you getting your feature over the line.

These are the following checks we'll normally put in place:

1. Create an issue first!

Except for small pull requests, create an issue to discuss the feature. The last thing we want is for someone to spend hours of their time on a feature only for someone else to have started work on something similar, or for the admins of the project to reject it for whatever reason e.g. does not fit with the project etc. Creating an issue does not take long and will help save time for everyone.

2. Create Documentation

Every PR to Farmer must have some documentation with it. If you modify a resource and add a new keyword, it must be added to the appropriate docs page.

3. Write Unit Tests

Every PR to Farmer should have at least one test associated with it. If no tests are added, you can expect at least a request for one or explanation as to why one is not necessary.

4. Write Release Notes

Every PR to Farmer must include an entry to the RELEASE_NOTES.md file under the next release. Briefly explain the feature and ideally link to the PR number e.g.

5. Adhere to Coding Standards

Here are some (very basic!) standards for the project:

  • Do not use yield - it is no longer necessary in F#.
  • Prefer [ for x in y do ... ] to [ for x in y -> ... ]
  • Never use .Value on Option types.
5.1 Using Fantomas

We use Fantomas to consistently format F#.

  1. Install it via: dotnet tool restore (only required once).
  2. Run it either:
    • Through IDE tooling (e.g. VS Code, Rider or Visual Studio)
    • Via the command line dotnet fantomas src -r

If you do not apply Fantomas formatting, your PR will be rejected as this is automatically checked by the build system.