Skip to content

Conversation

@jbrinkman
Copy link
Owner

This PR implements the exclusion and breaking change classification functionality for the DotNetApiDiff tool (Task 4.3).

Changes

  • Created IChangeClassifier interface for classifying API changes
  • Implemented ChangeClassifier class with support for:
    • Breaking change classification based on configuration
    • Exclusion pattern matching with wildcard support
    • Severity level assignment
  • Integrated the classifier into the ApiComparer workflow
  • Added comprehensive unit tests
  • Updated existing tests to accommodate the new dependency

Requirements Addressed

  • 3.1: Support for excluding types and members from comparison
  • 7.1: Classification of breaking vs. non-breaking changes
  • 7.2: Support for configurable breaking change rules
  • 7.3: Support for exclusion patterns with wildcards
  • 7.4: Support for severity levels

All tests are passing.

@jbrinkman jbrinkman requested a review from Copilot July 20, 2025 13:13
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 implements the exclusion and breaking change classification functionality for the DotNetApiDiff tool (Task 4.3). It introduces a new IChangeClassifier interface and its implementation to classify API changes as breaking, non-breaking, or excluded based on configuration rules, while integrating this classifier into the existing ApiComparer workflow.

Key changes implemented:

  • Created IChangeClassifier interface and ChangeClassifier implementation with support for breaking change classification and exclusion pattern matching with wildcards
  • Integrated the classifier into the ApiComparer workflow to classify changes before adding them to results
  • Added comprehensive unit tests for the new functionality and updated existing tests to accommodate the new dependency

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/DotNetApiDiff/Interfaces/IChangeClassifier.cs Defines interface for classifying API changes and checking exclusions
src/DotNetApiDiff/ApiExtraction/ChangeClassifier.cs Implements change classification logic with breaking change rules and exclusion patterns
src/DotNetApiDiff/ApiExtraction/ApiComparer.cs Integrates change classifier into the comparison workflow
src/DotNetApiDiff/Program.cs Registers ChangeClassifier service in dependency injection container
tests/DotNetApiDiff.Tests/ApiExtraction/ChangeClassifierTests.cs Comprehensive unit tests for change classification functionality
tests/DotNetApiDiff.Tests/ApiExtraction/ApiComparerTests.cs Updates tests to mock the new IChangeClassifier dependency
tests/DotNetApiDiff.Tests/ApiExtraction/ApiComparerWithMappingTests.cs Updates tests to mock the new IChangeClassifier dependency
tests/DotNetApiDiff.Tests/ApiExtraction/ApiComparerManualTests.cs Updates manual tests to mock the new IChangeClassifier dependency

@jbrinkman jbrinkman merged commit abcd241 into main Jul 20, 2025
9 checks passed
@jbrinkman jbrinkman deleted the feature/task-4.3-change-classification branch July 20, 2025 13:26
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