Skip to content

Conversation

@jbrinkman
Copy link
Owner

Description

This PR implements Taskfile.dev integration for common project tasks as specified in task 3.4.

Changes

  • Added Taskfile.yml with tasks for building, testing, and generating reports
  • Created .config/dotnet-tools.json for managing required .NET tools
  • Updated README.md with Taskfile usage instructions
  • Added coverage-report/ and reports/ directories to .gitignore

Requirements Addressed

  • Requirement 2.3: Tool provides clear usage instructions
  • Requirement 4.4: Supports console output with clear formatting

Testing

  • Verified that all tasks work correctly
  • Tested build, test, and coverage report generation

Documentation

  • Added Taskfile usage section to README.md
  • Included installation instructions for different platforms

@jbrinkman jbrinkman requested a review from Copilot July 19, 2025 01:45
Copy link
Contributor

Copilot AI left a 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
Copy link

Copilot AI Jul 19, 2025

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.

Suggested change
- rm -rf {{.COVERAGE_DIR}} || true
- if [ "$(uname)" = "Linux" ] || [ "$(uname)" = "Darwin" ]; then rm -rf {{.COVERAGE_DIR}}; else rmdir /S /Q {{.COVERAGE_DIR}}; fi || true

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Jul 19, 2025

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.

Suggested change
- 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

Copilot uses AI. Check for mistakes.
Taskfile.yml Outdated
desc: Install required dotnet tools
cmds:
- dotnet new tool-manifest --force || true
- dotnet tool install dotnet-reportgenerator-globaltool
Copy link

Copilot AI Jul 19, 2025

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.

Suggested change
- dotnet tool install dotnet-reportgenerator-globaltool
- dotnet tool install dotnet-reportgenerator-globaltool --ignore-failed-sources --version 5.1.18

Copilot uses AI. Check for mistakes.
@jbrinkman jbrinkman merged commit dceed97 into main Jul 19, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants