-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add Taskfile.dev for common project tasks #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Taskfile.dev integration to streamline common development tasks, providing a unified interface for building, testing, and generating reports in the DotNetApiDiff project.
- Added comprehensive task definitions for build, test, coverage, and CI workflows
- Integrated .NET tool management for coverage report generation
- Updated documentation with installation and usage instructions for Taskfile
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Taskfile.yml | Main task definitions including build, test, coverage, and tool management tasks |
| README.md | Added Taskfile installation instructions and common task usage examples |
| .markdownlint.json | Configuration to disable line length linting for markdown files |
| .kiro/specs/dotnet-api-diff/tasks.md | Updated task completion status for Taskfile implementation |
| .config/dotnet-tools.json | .NET tool manifest for managing reportgenerator dependency |
Taskfile.yml
Outdated
| desc: Clean build outputs | ||
| cmds: | ||
| - dotnet clean {{.SOLUTION}} | ||
| - rm -rf {{.COVERAGE_DIR}} || true |
Copilot
AI
Jul 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 'rm -rf' command directly may not work on Windows systems. Consider using a cross-platform approach like 'task: clean:coverage' with platform-specific implementations or use dotnet clean commands instead.
| - rm -rf {{.COVERAGE_DIR}} || true | |
| - if [ "$(uname)" = "Linux" ] || [ "$(uname)" = "Darwin" ]; then rm -rf {{.COVERAGE_DIR}}; else rmdir /S /Q {{.COVERAGE_DIR}}; fi || true |
Taskfile.yml
Outdated
| coverage:view: | ||
| desc: Open coverage report in default browser | ||
| cmds: | ||
| - open {{.COVERAGE_DIR}}/index.html || xdg-open {{.COVERAGE_DIR}}/index.html || start {{.COVERAGE_DIR}}/index.html |
Copilot
AI
Jul 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command chain assumes specific tools are available on each platform. Consider using Taskfile's built-in platform detection or checking for tool existence before executing platform-specific commands.
| - open {{.COVERAGE_DIR}}/index.html || xdg-open {{.COVERAGE_DIR}}/index.html || start {{.COVERAGE_DIR}}/index.html | |
| - | | |
| if [ "{{os}}" == "darwin" ]; then | |
| if command -v open >/dev/null 2>&1; then | |
| open {{.COVERAGE_DIR}}/index.html | |
| else | |
| echo "Error: 'open' command not found on macOS." | |
| exit 1 | |
| fi | |
| elif [ "{{os}}" == "linux" ]; then | |
| if command -v xdg-open >/dev/null 2>&1; then | |
| xdg-open {{.COVERAGE_DIR}}/index.html | |
| else | |
| echo "Error: 'xdg-open' command not found on Linux." | |
| exit 1 | |
| fi | |
| elif [ "{{os}}" == "windows" ]; then | |
| if command -v start >/dev/null 2>&1; then | |
| start {{.COVERAGE_DIR}}/index.html | |
| else | |
| echo "Error: 'start' command not found on Windows." | |
| exit 1 | |
| fi | |
| else | |
| echo "Error: Unsupported platform '{{os}}'." | |
| exit 1 | |
| fi |
Taskfile.yml
Outdated
| desc: Install required dotnet tools | ||
| cmds: | ||
| - dotnet new tool-manifest --force || true | ||
| - dotnet tool install dotnet-reportgenerator-globaltool |
Copilot
AI
Jul 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing the tool without specifying a version or checking if it already exists may cause conflicts. This should either check for existing installation or use 'dotnet tool install --ignore-failed-sources' to handle existing installations gracefully.
| - dotnet tool install dotnet-reportgenerator-globaltool | |
| - dotnet tool install dotnet-reportgenerator-globaltool --ignore-failed-sources --version 5.1.18 |
Description
This PR implements Taskfile.dev integration for common project tasks as specified in task 3.4.
Changes
Taskfile.ymlwith tasks for building, testing, and generating reports.config/dotnet-tools.jsonfor managing required .NET toolsRequirements Addressed
Testing
Documentation