|
| 1 | +<!-- omit in toc --> |
| 2 | + |
| 3 | +# Contributing to pre-commit |
| 4 | + |
| 5 | +First off, thanks for taking the time to contribute! ❤️ |
| 6 | + |
| 7 | +All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways |
| 8 | +to help and details about how this project handles them. Please make sure to read the relevant section before making |
| 9 | +your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The |
| 10 | +community looks forward to your contributions. 🎉 |
| 11 | + |
| 12 | +> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support |
| 13 | +> the project and show your appreciation, which we would also be very happy about: |
| 14 | +> |
| 15 | +> - Star the project |
| 16 | +> - Tweet about it |
| 17 | +> - Refer this project in your project's readme |
| 18 | +> - Mention the project at local meetups and tell your friends/colleagues |
| 19 | +
|
| 20 | +<!-- omit in toc --> |
| 21 | + |
| 22 | +## Table of Contents |
| 23 | + |
| 24 | +- [Contributing to pre-commit](#contributing-to-pre-commit) |
| 25 | + - [Table of Contents](#table-of-contents) |
| 26 | + - [Code of Conduct](#code-of-conduct) |
| 27 | + - [I Have a Question](#i-have-a-question) |
| 28 | + - [I Want To Contribute](#i-want-to-contribute) |
| 29 | + - [Reporting Bugs](#reporting-bugs) |
| 30 | + - [Before Submitting a Bug Report](#before-submitting-a-bug-report) |
| 31 | + - [How Do I Submit a Good Bug Report?](#how-do-i-submit-a-good-bug-report) |
| 32 | + - [Suggesting Enhancements](#suggesting-enhancements) |
| 33 | + - [Before Submitting an Enhancement](#before-submitting-an-enhancement) |
| 34 | + - [How Do I Submit a Good Enhancement Suggestion?](#how-do-i-submit-a-good-enhancement-suggestion) |
| 35 | + - [Your First Code Contribution](#your-first-code-contribution) |
| 36 | + - [Improving The Documentation](#improving-the-documentation) |
| 37 | + - [Styleguides](#styleguides) |
| 38 | + - [Commit Messages](#commit-messages) |
| 39 | + - [Join The Project Team](#join-the-project-team) |
| 40 | + - [Attribution](#attribution) |
| 41 | + |
| 42 | +## Code of Conduct |
| 43 | + |
| 44 | +This project and everyone participating in it is governed by the |
| 45 | +[pre-commit Code of Conduct](https://github.com/partcad/pre-commit/blob/main/.github/CODE_OF_CONDUCT.md). By |
| 46 | +participating, you are expected to uphold this code. Please report unacceptable behavior to <[email protected]>. |
| 47 | + |
| 48 | +## I Have a Question |
| 49 | + |
| 50 | +> If you want to ask a question, we assume that you have read the available |
| 51 | +> [Documentation](https://github.com/partcad/pre-commit). |
| 52 | +
|
| 53 | +Before you ask a question, it is best to search for existing [Issues](https://github.com/partcad/pre-commit/issues) that |
| 54 | +might help you. In case you have found a suitable issue and still need clarification, you can write your question in |
| 55 | +this issue. It is also advisable to search the internet for answers first. |
| 56 | + |
| 57 | +If you then still feel the need to ask a question and need clarification, we recommend the following: |
| 58 | + |
| 59 | +- Open an [Issue](https://github.com/partcad/pre-commit/issues/new). |
| 60 | +- Provide as much context as you can about what you're running into. |
| 61 | +- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. |
| 62 | + |
| 63 | +We will then take care of the issue as soon as possible. |
| 64 | + |
| 65 | +## I Want To Contribute |
| 66 | + |
| 67 | +> ### Legal Notice <!-- omit in toc --> |
| 68 | +> |
| 69 | +> When contributing to this project, you must agree that you have authored 100% of the content, that you have the |
| 70 | +> necessary rights to the content and that the content you contribute may be provided under the project license. |
| 71 | +
|
| 72 | +### Reporting Bugs |
| 73 | + |
| 74 | +<!-- omit in toc --> |
| 75 | + |
| 76 | +#### Before Submitting a Bug Report |
| 77 | + |
| 78 | +A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to |
| 79 | +investigate carefully, collect information and describe the issue in detail in your report. Please complete the |
| 80 | +following steps in advance to help us fix any potential bug as fast as possible. |
| 81 | + |
| 82 | +- Make sure that you are using the latest version. |
| 83 | +- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment |
| 84 | + components/versions (Make sure that you have read the [documentation](https://github.com/partcad/pre-commit). If you |
| 85 | + are looking for support, you might want to check [this section](#i-have-a-question)). |
| 86 | +- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there |
| 87 | + is not already a bug report existing for your bug or error in the |
| 88 | + [bug tracker](https://github.com/partcad/pre-commit/issues?q=label%3Abug). |
| 89 | +- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have |
| 90 | + discussed the issue. |
| 91 | +- Collect information about the bug: |
| 92 | + - Stack trace (Traceback) |
| 93 | + - OS, Platform and Version (Windows, Linux, macOS, x86, ARM) |
| 94 | + - Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant. |
| 95 | + - Possibly your input and the output |
| 96 | + - Can you reliably reproduce the issue? And can you also reproduce it with older versions? |
| 97 | + |
| 98 | +<!-- omit in toc --> |
| 99 | + |
| 100 | +#### How Do I Submit a Good Bug Report? |
| 101 | + |
| 102 | +> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue |
| 103 | +> tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <[email protected]>. |
| 104 | +
|
| 105 | +<!-- You may add a PGP key to allow the messages to be sent encrypted as well. --> |
| 106 | + |
| 107 | +We use GitHub issues to track bugs and errors. If you run into an issue with the project: |
| 108 | + |
| 109 | +- Open an [Issue](https://github.com/partcad/pre-commit/issues/new). (Since we can't be sure at this point whether it is |
| 110 | + a bug or not, we ask you not to talk about a bug yet and not to label the issue.) |
| 111 | +- Explain the behavior you would expect and the actual behavior. |
| 112 | +- Please provide as much context as possible and describe the _reproduction steps_ that someone else can follow to |
| 113 | + recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem |
| 114 | + and create a reduced test case. |
| 115 | +- Provide the information you collected in the previous section. |
| 116 | + |
| 117 | +Once it's filed: |
| 118 | + |
| 119 | +- The project team will label the issue accordingly. |
| 120 | +- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no |
| 121 | + obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs |
| 122 | + with the `needs-repro` tag will not be addressed until they are reproduced. |
| 123 | +- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as |
| 124 | + `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution). |
| 125 | + |
| 126 | +### Suggesting Enhancements |
| 127 | + |
| 128 | +This section guides you through submitting an enhancement suggestion for pre-commit, **including completely new features |
| 129 | +and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community |
| 130 | +to understand your suggestion and find related suggestions. |
| 131 | + |
| 132 | +<!-- omit in toc --> |
| 133 | + |
| 134 | +#### Before Submitting an Enhancement |
| 135 | + |
| 136 | +- Make sure that you are using the latest version. |
| 137 | +- Read the [documentation](https://github.com/partcad/pre-commit) carefully and find out if the functionality is already |
| 138 | + covered, maybe by an individual configuration. |
| 139 | +- Perform a [search](https://github.com/partcad/pre-commit/issues) to see if the enhancement has already been suggested. |
| 140 | + If it has, add a comment to the existing issue instead of opening a new one. |
| 141 | +- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to |
| 142 | + convince the project's developers of the merits of this feature. Keep in mind that we want features that will be |
| 143 | + useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, |
| 144 | + consider writing an add-on/plugin library. |
| 145 | + |
| 146 | +<!-- omit in toc --> |
| 147 | + |
| 148 | +#### How Do I Submit a Good Enhancement Suggestion? |
| 149 | + |
| 150 | +Enhancement suggestions are tracked as [GitHub issues](https://github.com/partcad/pre-commit/issues). |
| 151 | + |
| 152 | +- Use a **clear and descriptive title** for the issue to identify the suggestion. |
| 153 | +- Provide a **step-by-step description of the suggested enhancement** in as many details as possible. |
| 154 | +- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point |
| 155 | + you can also tell which alternatives do not work for you. |
| 156 | +- You may want to **include screenshots or screen recordings** which help you demonstrate the steps or point out the |
| 157 | + part which the suggestion is related to. You can use [LICEcap](https://www.cockos.com/licecap/) to record GIFs on |
| 158 | + macOS and Windows, and the built-in |
| 159 | + [screen recorder in GNOME](https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html.en) or |
| 160 | + [SimpleScreenRecorder](https://github.com/MaartenBaert/ssr) on Linux. |
| 161 | + <!-- this should only be included if the project has a GUI --> |
| 162 | +- **Explain why this enhancement would be useful** to most pre-commit users. You may also want to point out the other |
| 163 | + projects that solved it better and which could serve as inspiration. |
| 164 | + |
| 165 | +<!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. --> |
| 166 | + |
| 167 | +### Your First Code Contribution |
| 168 | + |
| 169 | +Use VS Code and Dev Containers. |
| 170 | + |
| 171 | +### Improving The Documentation |
| 172 | + |
| 173 | +Fork repo and open pull request. |
| 174 | + |
| 175 | +## Styleguides |
| 176 | + |
| 177 | +### Commit Messages |
| 178 | + |
| 179 | +Use this hook. |
| 180 | + |
| 181 | +## Join The Project Team |
| 182 | + |
| 183 | +Join `#pre-commit` channel on |
| 184 | +<a href="https://discord.gg/9AEu3vF7rv"><img alt="Discord" src="https://img.shields.io/discord/1091497262733074534?logo=discord&logoColor=white&label=Discord&labelColor=353c43&color=31c151"></a> |
| 185 | + |
| 186 | +## Attribution |
| 187 | + |
| 188 | +This guide is based on the [contributing.md](https://contributing.md/generator)! |
0 commit comments