From 3beb6b40a4ed8c26c19cbcd70d6fd9d5013bf4cf Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Fri, 5 Jun 2020 23:07:07 +0100 Subject: [PATCH] Add "Contributing" sections to README.md --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/README.md b/README.md index d0b140c..e5423fa 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,46 @@ reload-on-rebuild code, but you won't need webpack or Node.js when using carton The polyfill is distributed to you precompiled. It is currently work in progress, so watch the repository for imminent updates! + +## Contributing + +### Sponsorship + +If this tool saved you any amount of time or money, please consider [sponsoring +the work of its maintainer](https://github.com/sponsors/MaxDesiatov). While some of the +sponsorship tiers give you priority support or even consulting time, any amount is +appreciated and helps in maintaining the project. + +### Coding Style + +This project uses [SwiftFormat](https://github.com/nicklockwood/SwiftFormat) +and [SwiftLint](https://github.com/realm/SwiftLint) to +enforce formatting and coding style. We encourage you to run SwiftFormat within +a local clone of the repository in whatever way works best for you either +manually or automatically via an [Xcode +extension](https://github.com/nicklockwood/SwiftFormat#xcode-source-editor-extension), +[build phase](https://github.com/nicklockwood/SwiftFormat#xcode-build-phase) or +[git pre-commit +hook](https://github.com/nicklockwood/SwiftFormat#git-pre-commit-hook) etc. + +To guarantee that these tools run before you commit your changes on macOS, you're encouraged +to run this once to set up the [pre-commit](https://pre-commit.com/) hook: + +``` +brew bundle # installs SwiftLint, SwiftFormat and pre-commit +pre-commit install # installs pre-commit hook to run checks before you commit +``` + +Refer to [the pre-commit documentation page](https://pre-commit.com/) for more details +and installation instructions for other platforms. + +SwiftFormat and SwiftLint also run on CI for every PR and thus a CI build can +fail with incosistent formatting or style. We require CI builds to pass for all +PRs before merging. + +### Code of Conduct + +This project adheres to the [Contributor Covenant Code of +Conduct](https://github.com/swiftwasm/carton/blob/master/CODE_OF_CONDUCT.md). +By participating, you are expected to uphold this code. Please report +unacceptable behavior to conduct@carton.dev.