Skip to content

Commit

Permalink
Update guidelines on issues and PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
dostonnabotov committed Jan 3, 2025
1 parent ef1eb88 commit 48a07f1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 18 deletions.
39 changes: 28 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,41 @@ You can contribute in two main ways:

## Improving the code

If you have a feature request or want to fix a bug, feel free to:
### How to report bugs

- [Open an Issue](https://github.com/dostonnabotov/quicksnip/issues) to let us know what’s up.
- [Send a Pull Request](https://github.com/dostonnabotov/quicksnip/pulls) with your changes.
If you spot a bug in the codebase or issues with the documentation, please open up a [GitHub issue](https://github.com/dostonnabotov/quicksnip/issues) detailing the problem before creating a PR. Once confirmed with maintainers, you can then create a PR.

### How to propose new features

If you are interested in proposing new features, please open up a new [GitHub discussion](https://github.com/dostonnabotov/quicksnip/discussions) with details for the proposed feature.

Please do not create a PR for a new feature without first discussing it with the maintainers. If you create a PR for a new feature without discussing it first, then your PR will be closed.

---

## Snippets Guidelines

### Snippet Tags

Tags must describe the snippet with simple word. \
For example a snippet that capitalize a word would have `string` and `capitalize` as tags. \
**! Do not add the language you are using as a tag, nor some generic keyword like `utility` !**
- Tags must describe the snippet with simple word.

Here's an example:

```md
---
title: Convert Number to Currency
description: Converts a number to a currency format with a specific locale.
author: axorax
tags: number,currency
---
```

**Do not use generic keywords or the language itself as a tag `utility` or `javascript`!**

### Snippet Format

**All** snippets should follow the following structure:

- A `code` segment, containing a function with the actual snippet functionnality
- An `example` segement, containing one or more examples of use

Expand All @@ -41,17 +58,17 @@ function example(x) {
// Usage:
example(5) // Returns: 10
```
If your function doesn't return anything just show how to use it. \
If the result of your function is too complicated to be expressed in a single comment, your snippet is probably too complex to begin with.

If your function doesn't return anything just show how to use it. If the result of your function is too complicated to be expressed in a single comment, your snippet is probably too complex to begin with.

### Snippet boundaries

To **check if your snippet will not get refused** ask yourself those questions:
To ensure your snippet isn’t refused, consider these questions:
- **Does the standard library of my language provide an easy way of doing this ?**
- **Does that snippet have a real, and practical use case ?**
- **Could it be split into separate parts to be better understood ?**

If one of question is true, then your snippet will most likely get refused !
If any answer is yes, then your snippet will most likely get rejected.

---

Expand Down Expand Up @@ -230,6 +247,6 @@ If you want to introduce a new programming language, here's how to do it:

Whether you’re fixing a tiny typo, writing a new snippet, or dreaming up big features, every bit counts! 🛠️

If you have any questions or need help, feel free to open an issue or tag me.
If you have any questions or need help, feel free to open a new [GitHub discussion](https://github.com/dostonnabotov/quicksnip/discussions).

Happy coding! 💻✨
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ Be sure to check out the [CONTRIBUTING.md](/CONTRIBUTING.md) file for detailed g

### Improving the code

Got a feature idea or bug fix? Here's how you can contribute:
- **Reporting bugs**

- [Open an issue](https://github.com/dostonnabotov/quicksnip/issues) to share your ideas or report a bug.
- [Send a pull request](https://github.com/dostonnabotov/quicksnip/pulls) with your changes.
- If you spot a bug in the codebase or issues with the documentation, please open up a [GitHub issue](https://github.com/dostonnabotov/quicksnip/issues) detailing the problem before creating a PR.
- Once confirmed with maintainers, you can then create a PR.

- **Proposing new features**

- If you are interested in proposing new features, please open up a new [GitHub discussion](https://github.com/dostonnabotov/quicksnip/discussions) with details for the proposed feature.
- Please do **not** create a PR for a new feature without first discussing it with the maintainers. If you create a PR for a new feature without discussing it first, then your PR will be closed.

### Adding a Snippet

Expand Down Expand Up @@ -99,11 +104,13 @@ For more details about adding new categories or programming languages, check out

To keep things smooth and consistent, please:

- Follow the formatting rules described above.
- Include all mandatory fields in the snippet.
- Test your snippet to ensure it works as expected.
- [x] Follow the style and contribution guidelines of this project.
- [x] Include all mandatory fields in the snippet.
- [x] Test your snippet to ensure it works as expected.

Following these guidelines helps us (and everyone else) review and merge your contributions faster.

Following these guidelines helps me (and everyone else) review and merge your contributions faster.
**If you fail to meet the guidelines, your PR will most likely get rejected.**

## License

Expand Down

0 comments on commit 48a07f1

Please sign in to comment.