# How to contribute to Shufflecake Thank you for your interest in contributing! These guidelines are subject to change, so please check before submitting a contribution. - [In a nutshell](#nutshell) - [Asking support](#support) - [Opening issues](#issues) - [Code submission guidelines](#guidelines) - [AI use](#ai) - [Coding rules](#rules) - [Commits](#commits) - [Pull requests](#pr) - [Developer certificate of origin](#dco) ## In a nutshell "We" are the maintainers of Shufflecake, please see the file README.md in this directory. We do not accept anonymous code contributions: please use your full legal name when submitting, or anyway make it clearly visible in text. Opening issues anonymously is OK, though. We require code contributors to sign a DCO, but no CLA or CTA. See [Developer certificate of origin](#dco) for instructions. We are flexible in the way we accept contributions, although the best way is to submit an issue or a pull request through the project's git platform (e.g., Codeberg). AI use is allowed but must be disclosed. Always keep in mind that this project embraces the principles of privacy, libre software, and digital freedom. ## Asking support Before submitting a contribution, please make sure to check: - Is it an issue? Check if it is a known problem before, i.e., if a similar open issue already exists. - Is it a feature request? Consider whether it aligns with the goal of the project, or if an open issue about it already exists. - Is it a code contribution? Please read below for submission guidelines. - Did you find a security bug? Please follow the instructions in the SECURITY.md file in this directory. In case of doubt, you are always welcome to reach out to our support channels (XMPP, Mastodon, etc) or by email. ## Opening issues We are pretty relaxed in the git issues format requirements, but please make sure to include all the necessary information. We will assign appropriate labels if you forget to do it, or edit the issue when necessary. ## Code submission guidelines Please be verbose and accurate regarding what your contributions does and how, it will make our review process easier. If you would like to implement a new breaking or major feature, please submit an issue with a proposal for your work first, to be sure that we can use it. Minor features can be crafted and submitted directly, but opening an issue beforehand is still recommended. ### AI use The use of AI/LLM in the submitted code is allowed, but MUST be disclosed in the commit message (with a clear reference to the parts of the code that were not human-generated). This is not to discourage the use of these tools, but the disclosure will help us to focus on recurrent/common failure patterns when reviewing the code. When submitting a code contribution without such disclosure, you confirm that you have no reason to believe that the submitted code is AI-generated. ### Coding rules We do not set a column limit to wrap code. Use tabs to indent code, not spaces. You can use spaces if you need to fine-tune alignment for any reason, e.g. in comments. Submission using spaces for indentation instead of tabs will either be rejected or reformatted before being merged. We are relatively flexible on C coding style, as long as it is reasonable. For example, a good reference is [this one](https://www.cs.umd.edu/~nelson/classes/resources/cstyleguide/). ### Commits We (try to) follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages. In a nutshell: ``` : [optional body] [optional footer(s)] ``` The field `` must be one of the following: - build: Changes that affect the build system or external dependencies. - docs: Documentation only changes. - feat: A new feature or performance improvement. - fix: A bug fix. - refactor: A code change that neither fixes a bug nor adds a feature. - revert: Reverts a previous commit. It must be followed by the header (title) of the reverted commit. In the body it should say: `This reverts commit .`, where the hash is the SHA of the commit being reverted. - style: A changes in the appearance of some content which does not alter meaning or functionality. - other: Anything else (please use this sparingly). A breaking change introduces a potential incompatibility with the current version of Shufflecake, for example it might make impossible to open a Shufflecake volume created with the previous version. Breaking changes must be marked with an exclamation mark following the `` field. Example: `feat!: Change hash algorithm from MD5 to SHA3`. Ideally, we would like the `` to have the first letter capitalized, be separated by a whitespace from the preceding column `:`, and to __not__ end with a period `.`. Use imperative, e.g.: `fix: Remove bug in file.c` instead of `fix: Removed bug in file.c`. You can use `