Skip to content

Commit 03fe97d

Browse files
committed
refactor(readme): contributing section.
feat(contributing): add contributing.md.
1 parent 0b69ac6 commit 03fe97d

2 files changed

Lines changed: 67 additions & 7 deletions

File tree

CONTRIBUTING.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Contributing to libprocman
2+
3+
First off, thank you for considering contributing to **libprocman** — your interest and effort mean a lot! Whether you're fixing bugs, adding new features, improving documentation, or writing tests, your contributions are always welcome.
4+
5+
## 🧭 How to Get Started
6+
7+
1. **Fork** the repository.
8+
2. **Clone** your fork:
9+
```sh
10+
git clone https://github.com/provrb/libprocman.git
11+
cd libprocman
12+
```
13+
3. Create a new branch:
14+
```sh
15+
git checkout -b feature/your-feature-name
16+
```
17+
18+
## 🧪 Testing Your Changes
19+
20+
If you make changes to the core library, you must write or update a test in `tests.cpp`. Here’s how:
21+
22+
1. Add a test case that covers the functionality you've added or modified.
23+
2. Use the `Tests` class to define your expected result.
24+
3. Build and run tests:
25+
```sh
26+
cmake -B build -G Ninja
27+
cmake --build build
28+
./build/libprocman.exe
29+
```
30+
4. Ensure **all tests pass** before opening a pull request.
31+
32+
## 🎨 Code Style Guidelines
33+
34+
- Follow the existing naming conventions and structure.
35+
- Keep your code clean and readable.
36+
- Prefer clarity over cleverness.
37+
- Avoid unnecessary dependencies.
38+
39+
## 📦 Making a Pull Request
40+
41+
Before submitting a pull request:
42+
43+
- Make sure your branch is up to date with `main`:
44+
```sh
45+
git fetch origin
46+
git rebase origin/main
47+
```
48+
- **Squash commits** if possible for a clean history.
49+
- Write a **clear and descriptive** pull request message.
50+
- Reference any related issue(s) using `#issue_number` syntax.
51+
52+
## ✅ Pull Request Checklist
53+
54+
- [ ] My code follows the project's code style.
55+
- [ ] I have written tests that prove my fix is effective or my feature works.
56+
- [ ] All existing and new tests pass.
57+
- [ ] I have commented my code, especially in hard-to-understand areas.
58+
- [ ] I have squashed related commits where appropriate.
59+
60+
## 🧠 Pro Tips
61+
62+
- New to the project? Look through [issues](https://github.com/provrb/libprocman/issues) labeled `good first issue` or `help wanted`.
63+
- Want to suggest something new? Open an issue before making major changes.
64+
- Need help? Open an issue or join the discussion in existing ones.
65+
66+
Thanks again for helping make **libprocman** better!

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,7 @@ Depending on your use case, you can choose to pick from different file formats:
5151
3. Use the features provided by the class. Feel free to add your own functions!
5252

5353
## Contributing
54-
Contributions are welcome! Feel free to open issues or submit pull requests to enhance features or fix bugs.
55-
56-
When creating a pull request, there a couple things to keep in mind:
57-
1. **Ensure you follow the codebase style** - Doesn't have to be spot on, but make sure it aligns with the current code style. It would be ugly to everyone if there were several different naming conventions being used.
58-
2. **Create a test case** - When adding or refactoring a feature, ensure you test that function in the tests.cpp file. You can do this by simply calling the function and then telling the Tests class the expected result. Any features that do not pass a test will not be merged.
59-
3. **Be clear and concise** - In your pull request, ensure your commits are either squashed or neatly created with clear and concise messages. Your pull request should explain thoroughly what was changed. No one should have to scratch their head reading your pull request.
60-
54+
Contributions are welcome! View the [contributing guidlines here!](./CONTRIBUTING.md)
6155
## License
6256
This project is licensed under the MIT License. See the [LICENSE](./LICENSE.md) file for details.
6357

0 commit comments

Comments
 (0)