Thank you for your interest in contributing to Task Manager CLI! This document provides guidelines and instructions for contributing.
Please be respectful and constructive in all interactions. We're building this together!
- .NET 8 SDK or later
- Git
- A code editor (VS Code, Visual Studio, Rider, etc.)
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/dotnet-task-manager.git cd dotnet-task-manager -
Add the upstream remote:
git remote add upstream https://github.com/codeforgood-org/dotnet-task-manager.git
-
Restore dependencies:
dotnet restore
-
Build the project:
./build.sh build # Linux/macOS build.cmd build # Windows
Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bugfix-name- Write your code following our coding standards (see below)
- Add or update tests for your changes
- Ensure all tests pass:
./build.sh test - Format your code:
dotnet format
- Follow the .editorconfig settings
- Use meaningful variable and method names
- Add XML documentation comments for public APIs
- Keep methods focused and small
- Write unit tests for new functionality
- Maintain or improve code coverage
src/TaskManager.CLI/
├── Models/ # Data models
├── Interfaces/ # Service interfaces
├── Services/ # Business logic implementation
└── Program.cs # CLI entry point
tests/TaskManager.Tests/
└── TaskServiceTests.cs # Unit tests
- Write unit tests for all new functionality
- Use descriptive test names that explain what is being tested
- Follow the Arrange-Act-Assert pattern
- Use xUnit for test framework
- Use Moq for mocking dependencies
Example test:
[Fact]
public void AddTask_WithValidDescription_ReturnsTask()
{
// Arrange
var service = CreateService();
var description = "Test task";
// Act
var task = service.AddTask(description);
// Assert
Assert.NotNull(task);
Assert.Equal(description, task.Description);
}Write clear, concise commit messages:
- Use the imperative mood ("Add feature" not "Added feature")
- First line should be 50 characters or less
- Include more details in the body if necessary
- Reference issue numbers when applicable
Example:
Add search functionality for tasks
- Implement SearchTasks method in TaskService
- Add search command to CLI
- Add unit tests for search functionality
Fixes #123
-
Update your branch with the latest upstream changes:
git fetch upstream git rebase upstream/main
-
Push your changes to your fork:
git push origin feature/your-feature-name
-
Create a pull request on GitHub with:
- Clear description of changes
- Reference to related issues
- Screenshots if applicable (for UI changes)
- Confirmation that tests pass
- Code follows project coding standards
- All tests pass locally
- New tests added for new functionality
- Documentation updated if needed
- Commit messages are clear and descriptive
- Branch is up to date with main
- No merge conflicts
# Clean build artifacts
./build.sh clean
# Restore dependencies
./build.sh restore
# Build the project
./build.sh build
# Run tests
./build.sh test
# Run tests with coverage
./build.sh coverage
# Publish for all platforms
./build.sh publish
# Run the application
./build.sh run -- <command> [options]
# Format code
./build.sh format
# Run full pipeline
./build.sh all# Run all tests
dotnet test
# Run tests with detailed output
dotnet test --verbosity detailed
# Run specific test
dotnet test --filter "FullyQualifiedName~AddTask_WithValidDescription"
# Run tests with coverage
dotnet test --collect:"XPlat Code Coverage"When adding new features:
- Check existing issues - Someone might already be working on it
- Create an issue - Discuss your idea before starting work
- Design first - Think about the interface and architecture
- Write tests - Test-driven development is encouraged
- Implement - Write clean, documented code
- Update docs - Update README.md and other documentation
- Submit PR - Follow the pull request guidelines
When reporting bugs, include:
- Description - Clear description of the issue
- Steps to reproduce - Detailed steps to reproduce the bug
- Expected behavior - What you expected to happen
- Actual behavior - What actually happened
- Environment - OS, .NET version, etc.
- Screenshots - If applicable
When requesting features:
- Use case - Explain why this feature would be useful
- Proposed solution - Describe how you envision it working
- Alternatives - Any alternative solutions you've considered
- Additional context - Any other relevant information
If you have questions:
- Check existing issues and pull requests
- Review the README.md
- Open a new issue with the "question" label
Contributors will be recognized in:
- The project README.md
- Release notes
- GitHub contributors page
Thank you for contributing to Task Manager CLI!