Welcome to Salam! We're glad you're interested in contributing to our open-source project. This guide will help you understand the contribution process and ensure your contributions are valuable and well-received.
-
Code Contributions: Fix bugs, add new features, or improve existing code. Please follow our coding conventions and guidelines when submitting code contributions.
-
Documentation: Help write or improve documentation, including README files, code comments, and user guides, to ensure others can understand and use Salam effectively.
-
Testing: Contribute to the quality and stability of Salam by writing and running tests, identifying bugs, and preventing regressions.
-
Bug Reports: Report bugs or unexpected behavior you encounter, providing steps to reproduce the issue and details about your environment.
-
Feature Requests: Share your ideas for new features or improvements and discuss them with the community and maintainers.
-
Community Support: Assist others by answering questions, providing support, and sharing your expertise on mailing lists, forums, or chat channels.
-
Fork the Repository: Create a copy of the project by forking the SalamLang/Salam repository on GitHub.
-
Clone Your Fork: Clone the repository to your local machine using:
git clone https://github.com/SalamLang/Salam.git
-
Create a Branch: Create a new branch for your contribution with a descriptive name, such as
feature/my-new-feature
.git checkout -b feature/my-new-feature
-
Make Changes: Implement your changes to the code, documentation, or tests as necessary.
-
Test Your Changes: Ensure your changes work as expected by testing them thoroughly.
-
Commit Your Changes: Commit your changes with a clear and descriptive message.
git commit -am 'Add new feature'
-
Push Your Changes: Push your changes to your fork on GitHub.
git push origin feature/my-new-feature
-
Submit a Pull Request: Submit a pull request from your branch to the main repository, providing a description of your changes and their value.
To maintain consistency and readability, please follow these coding conventions when contributing code:
- Use clear and descriptive variable names, function names, and comments.
- Write meaningful commit messages that explain the purpose of each commit.
- Keep your changes focused and atomic. Avoid mixing unrelated changes in the same pull request.
- Test your code thoroughly to ensure its functionality and prevent regressions.
To help maintain consistent code quality, we use the following formatting and linting tools:
-
clang-format: We use
clang-format
to ensure consistent formatting for C/C++ files. Please runclang-format
before submitting a pull request. You can configure your editor to do this automatically.To format your code using
clang-format
:clang-format -i <your-file>
-
clang-tidy: Use
clang-tidy
to catch common errors, style issues, and potential bugs. It's recommended to runclang-tidy
as part of your workflow.To run
clang-tidy
:clang-tidy <your-file>
-
Other Tools: You may also use additional linting or static analysis tools, such as
cppcheck
orvalgrind
, to improve the efficiency and correctness of the code.
We recommend using Git hooks or pre-commit hooks to automatically run formatters or linters before each commit. You can set this up with the following steps:
-
Install
pre-commit
:pip install pre-commit
-
Set up the hooks:
pre-commit install
If you have any questions or need assistance, feel free to reach out to the project maintainers or the community. We're here to support each other in making Salam the best it can be.
Thank you for your interest in contributing to Salam! We appreciate your help in making this project a success. Happy coding!