Project: Cerbos (Provisioning / Security & Compliance)
File: CONTRIBUTING.md

Contributing to Cerbos ====================== Thank you for your interest in Cerbos. We welcome contributions from the community. Please note that we have a that must be followed when interacting with this project. In addition, please read the guidelines below to ensure that your contributions have a better chance of being accepted. - Submitting pull requests Before submitting a pull request, please in the GitHub repository and provide information about the problem you are trying to fix and how you plan to address it. Include as much detail as possible to make it easier for others to understand your thought process. Wait for the project maintainers and other community members to respond to your proposal and clearly agree on a course of action. Create your patch, constraining yourself to what was agreed on the issue. If previously unforeseen problems arise and you have to make significant changes to an area that wasnt discussed in the issue, make sure to go back to the issue to discuss the new circumstances and get buy-in from the people who are involved. Run the pre-commit checks that are appropriate for the kind of change. (See below for details.) Submit your pull request. We require all pull requests to follow the format. Use to link the PR to the original issue. At least one approval from a maintainer is required to merge the pull request. Write idiomatic Go. is the canonical source while the contains a lot of good advice as well. Make sure each source file contains the appropriate licence header: ``` Copyright 2021-2024 Zenauth Ltd. SPDX-License-Identifier: Apache-2.0 ``` Add tests to cover the functionality you are adding or modifying. Add new documentation or update existing content to ensure that the documentation stays consistent with the change you are introducing. See for tips on writing

Avoid introducing new dependencies if possible. All dependencies must have an appropriate open source licence (Apache-2.0, BSD, MIT). Make sure your code is `gofmt`ed. Run `make lint` and fix any warnings produced by the linter. Sign-off your commits to provide a . You can do this by adding the `-s` flag to your `git commit` command. ```sh git commit -s -m 'bug: Fix for bug X' ``` We use to write documentation. Please note that some AsciiDoctor features might not be available in , the static site generation software we use. Use simple, . Also refer to the for general advice on writing good documentation. Do not add third-party content in-line without attribution. Use links where possible. Ensure that any binary assets (images, videos, etc.) are added to . Sign-off your commits to provide a . You can do this by adding the `-s` flag to your `git commit` command. ```sh git commit -s -m 'bug: Fix for bug X' ``` Developing Cerbos -- Cerbos is developed using the . Check the `go` directive in the `go.mod` file to find out the minimum version of Go required. The `Makefile` automatically installs required build tools using the versions defined in `tools/go.mod`. Run `make clean-tools` to clear the cache and force the installation of new versions. Useful `make` targets: `make build`: Compile, test and build the Cerbos binaries and container. Binaries will be output to the `dist` directory. The container name would be `ghcr.io/cerbos/cerbos:<VERSION>-prerelease`. `make pre-commit`: Run tests, lint, and generate code and documentation. Run this before submitting a PR to make sure your code is ready to submit. `make dev-server`: Start a Cerbos server `make docs`: Generate docs and preview in browser. Getting Help Post a question in the Join our Email us at help@cerbos.dev Visit our website at https://cerbos.dev