Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@

# Contributing to desafios 🚀

Thank you for your interest in contributing to **desafios**! We welcome contributions of all kinds—bug fixes, new challenges, documentation improvements, design tweaks, or ideas. To make the process as smooth as possible, please read and follow these guidelines.

---

## Table of Contents

1. [Code of Conduct](#code-of-conduct)
2. [How to Contribute](#how-to-contribute)
1. [Picking an Issue / Idea](#picking-an-issue--idea)
2. [Fork & Branch](#fork--branch)
3. [Development & Style Guidelines](#development--style-guidelines)
4. [Testing & Validation](#testing--validation)
5. [Pull Request Process](#pull-request-process)
3. [Commit Message Guidelines](#commit-message-guidelines)
4. [Code Review & Merging](#code-review--merging)
5. [Attribution & Credit](#attribution--credit)
6. [License](#license)

---

## Code of Conduct

By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md).
Be respectful, considerate, and collaborative.

---

## How to Contribute

### Picking an Issue / Idea

- Check the [Issues](https://github.com/devsnorte/desafios/issues) tab to see what’s open or in discussion.
- You may also propose **new challenges** or **improvements** via a new issue—label them accordingly (e.g. `enhancement`, `challenge`).
- If you’re unsure where to start, look for issues labeled `good first issue` or `help wanted`.

### Fork & Branch

1. Fork the repository to your account.
2. Clone your fork locally:
```bash
git clone https://github.com/your-username/desafios.git

3. Create a descriptive branch for your changes:

```bash
git checkout -b feature/your-new-challenge
```

### Development & Style Guidelines

* **Directory structure**
Add your solution under a folder with your **GitHub username** or a meaningful challenge name, following existing structure.
* **Naming conventions**
Use **kebab-case** or **snake_case** for file names (whichever is prevailing in the repo).
* **Code quality**
Write clear, readable, maintainable code. Add comments where needed.
* **Documentation**
If your change introduces new behavior, include documentation or examples in `README.md` or relevant challenge docs.

### Testing & Validation

* Ensure your code runs without errors under the supported environment(s).
* If there are existing tests or examples, make sure nothing breaks.
* (Optional) Include tests or sample inputs/outputs where applicable.

### Pull Request Process

1. Push your branch to your fork:

```bash
git push origin feature/your-new-challenge
```
2. Open a Pull Request (PR) from your branch into `devsnorte/desafios:main`.
3. In your PR description, include:

* What you did (feature, bug fix, challenge, docs, etc.)
* Why the change is needed
* Any screenshots, examples, or test results
* Any dependencies or special instructions
4. Respect the template (if the repo has a PR template).

---

## Commit Message Guidelines

* Use present-tense, imperative style (e.g. `Add new challenge for …`, `Fix issue with …`).
* Prefix scopes if useful: `challenge: …`, `docs: …`, `refactor: …`, `test: …`.
* Keep the subject line < 50 characters if possible.
* Use the body to explain *why* (not only *what*) if needed, wrapped at ~72 characters.

Example:

```
challenge: add “Longest Prime Gap” problem

- Created folder `yourusername/longest-prime-gap`
- Added `README.md` with problem statement
- Provided sample input/output and solution in Python
```

---

## Code Review & Merging

* After opening a PR, maintainers and other contributors may provide feedback. Please respond, make requested changes, and push updates.
* Once approved, a maintainer will merge your PR.
* After merge, your contribution will be listed in the contributors (via **all-contributors**).
* If conflicts arise, rebase or merge the `main` branch into your branch and resolve.

---

## Attribution & Credit

We use the [all-contributors](https://allcontributors.org/) specification to recognize all types of contributions (code, documentation, design, etc.). Contributions will be acknowledged in the repository’s README.

---



Once again, thanks for your interest! 🧡
Let’s build a stronger and richer **desafios** community together.