We love your input! We want to make contributing to CSharpEssentials as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
By participating in this project, you are expected to uphold our Code of Conduct.
- .NET SDK: .NET 9 SDK (or .NET 8 SDK for netstandard targets)
- Git: For version control
# Clone your fork
git clone https://github.com/senrecep/CSharpEssentials.git
cd CSharpEssentials
# Configure git hooks (enables pre-commit badge validation)
git config core.hooksPath .githooks
# Build the solution
dotnet build
# Run the test suite
dotnet testHere's how you can contribute to the project using Git:
-
Fork the Repository:
# Clone your fork git clone https://github.com/senrecep/CSharpEssentials.git # Navigate to the newly cloned directory cd CSharpEssentials
-
Create a Branch:
# Create a new branch for your changes git checkout -b <branch-name> # Example: git checkout -b feature/new-validation-rule
-
Make your changes:
- Write your code
- Add tests if necessary
- Update documentation
-
Commit your changes:
# Add your changes git add . # Commit with a descriptive message git commit -m "Description of your changes"
-
Keep your branch updated:
# Add the upstream repository git remote add upstream https://github.com/senrecep/CSharpEssentials.git # Fetch upstream changes git fetch upstream # Rebase your branch on upstream main git rebase upstream/main
-
Push your changes:
# Push your changes to your fork git push origin <branch-name>
-
Create a Pull Request:
- Go to your fork on GitHub
- Click "New Pull Request"
- Select your branch and submit the pull request
- Add a description of your changes
- Link any relevant issues
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
We Use Github Flow
Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests:
- Fork the repo and create your branch from
main. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code follows the existing style.
- Issue that pull request!
In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.
Report bugs using Github's issue tracker
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy!
Great Bug Reports tend to have:
- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
- Clone the repository
- Create a new branch for your feature/fix
- Write your code
- Write/update tests
- Run the test suite
- Push your changes
- Create a Pull Request
- Use 4 spaces for indentation
- Follow C# coding conventions
- Write XML documentation for public APIs
- Keep methods small and focused
- Use meaningful names for variables and methods
- Write unit tests for new features
- Ensure all tests pass before submitting PR
- Follow existing test patterns
- Include both positive and negative test cases
- Update relevant documentation
- Include XML comments for public APIs
- Update README.md if needed
- Add examples for new features
By contributing, you agree that your contributions will be licensed under its MIT License.