Thanks for your interest in contributing! We welcome bug reports, feature requests, documentation improvements, and code contributions. This document outlines the recommended workflow and expectations to make contributions smooth and reviewable.
- How to contribute
- Opening issues
- Submitting pull requests
- Branching & commit guidelines
- Coding style & tests
- Local development and tests
- CI and review process
- License & contributor agreement
- Communication
There are several ways to contribute:
- Report bugs or request features by opening an issue.
- Fix issues or implement small features via pull requests (PRs).
- Improve or clarify documentation (README, docs).
- Add or improve tests.
If you're unsure where to start, check open issues or open a discussion/issue asking for guidance.
When opening an issue, please:
- Use a clear, descriptive title.
- Describe the problem or desired feature and why it matters.
- Include a minimal, reproducible example (if applicable).
- Provide environment details (OS, .NET SDK version).
- Label the issue appropriately (bug, enhancement, docs).
Suggested issue template:
- Title: short, descriptive
- Body:
- Problem / Motivation
- Steps to reproduce (if bug)
- Expected behavior
- Actual behavior
- Environment (.NET SDK version, OS)
- Fork the repository.
- Create a topic branch from
main:- Branch name format:
username/short-descriptionorfix/issue-123-description
- Branch name format:
- Make changes in the branch and commit logically (one concern per commit).
- Ensure tests pass locally and add tests for new functionality.
- Push your branch to your fork and open a PR against
mainin this repository. - In the PR description, reference any related issues (e.g.,
Fixes #123) and include a short summary of changes and rationale.
PR checklist (for contributors):
- Code builds and runs locally (
dotnet build). - Tests pass (
dotnet test). - New/changed behavior is covered by tests where feasible.
- Changes follow the coding style and project conventions.
- Documentation/README updated if the user-facing behavior changed.
- Base feature branches on
main. - Keep changes scoped and small where possible.
- Use descriptive commit messages. We recommend the Conventional Commits style:
- feat: add new feature
- fix: bug fix
- docs: documentation only changes
- style: formatting, missing semi-colons, etc.
- refactor: code change that neither fixes a bug nor adds a feature
- test: adding missing tests or correcting existing tests
- chore: build process or auxiliary tools
Example commit:
feat(validation): add IDN support to URL parser
This repository uses C#/.NET conventions:
- Follow .NET naming and layout conventions (PascalCase for public members, camelCase for private fields).
- Keep lines reasonably short (wrap at ~120 characters).
- Use XML documentation comments for public APIs.
- Prefer immutability where practical.
- Format code using
dotnet formator an.editorconfigif provided.
If you add new dependencies, prefer minimal and actively maintained packages and explain the rationale in the PR.
- Unit tests should be added under the test project (or follow the repo's test structure).
- Use
dotnet testto run tests locally. - Aim to keep tests deterministic and fast.
- Include test data and examples when helpful.
To build and test locally (typical):
- Install the .NET SDK (match project SDK; check
global.jsonif present). - Clone the repo:
git clone https://github.com/2024si96553-droid/safe-url-validator.git cd safe-url-validator - Restore and build:
dotnet restore dotnet build - Run tests:
dotnet test
If the project provides scripts or a Makefile, prefer those instructions.
- Contributors should expect a continuous integration (CI) run on PRs (e.g., GitHub Actions). Ensure your branch passes CI checks.
- Maintainters will perform code review; please respond to review comments and push updates to your PR branch.
By contributing to this project, you agree that your contributions are licensed under the project's license (see LICENSE). If you are contributing from an employer or similar, ensure you have the right to submit the contribution under this license.
- Use issues for bug reports and feature requests.
- For discussion or help, open an issue with the "discussion" or "help" tag if available.
- Be respectful and follow a professional, welcoming tone.
Thank you for helping improve safe-url-validator!