Conversation
…iffing development (#53) * Initial plan * Add comprehensive GitHub Copilot instructions for AngleSharp.Diffing Co-authored-by: egil <105649+egil@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: egil <105649+egil@users.noreply.github.com>
* Ignore unmatched :ignore attributes * Add more tests * Add test to cover situation where no ignore attribute was requested * Add :ignore filter approach * Fix Linux pipeline * Create IgnoreAttributeStrategy and make IgnoreAttributeComparer obsolete * Revert "Fix Linux pipeline" This reverts commit 2597558.
…ards (#51) * Initial plan * Modernize CI workflow to use dotnet CLI directly Co-authored-by: egil <105649+egil@users.noreply.github.com> * Update build.sh to use modern dotnet CLI instead of deprecated Cake/mono Co-authored-by: egil <105649+egil@users.noreply.github.com> * Upgrade build system from dotnet CLI to Nuke build automation system Co-authored-by: egil <105649+egil@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: egil <105649+egil@users.noreply.github.com>
|
|
There was a problem hiding this comment.
Pull Request Overview
This PR prepares a version 1.1.0 release with a significant enhancement to the ignore attribute functionality. The main feature allows :ignore marked attributes to work properly when the ignored attribute is not found in the test HTML, preventing false positive differences.
Key changes:
- Refactored and consolidated ignore attribute logic into a new unified strategy
- Enhanced matcher capability to handle unmatched ignore attributes
- Added comprehensive test coverage for the new functionality
- Migrated build system from Cake to NUKE for better maintainability
Reviewed Changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
IgnoreAttributeStrategy.cs |
New unified strategy that consolidates ignore attribute comparison and matching logic |
IgnoreAttributeComparer.cs |
Marked as obsolete with extraction of shared logic |
DiffingStrategyPipelineBuilderExtensions.cs |
Updated to use new strategy and register matcher |
SourceMap.cs |
Added helper method to improve readability |
HtmlDifferenceEngine.cs |
Added using statement for new strategy namespace |
| Test files | Added comprehensive test data and updated test cases to use new strategy |
| Build system files | Complete migration from Cake to NUKE build system |
CHANGELOG.md |
Documented new 1.1.0 release features |
|
|
||
| private static bool IsIgnoreAttribute(IAttr source) | ||
| { | ||
| return source.Name.EndsWith(DIFF_IGNORE_POSTFIX, StringComparison.OrdinalIgnoreCase); |
There was a problem hiding this comment.
Extra space between 'DIFF_IGNORE_POSTFIX,' and 'StringComparison.OrdinalIgnoreCase' should be removed for consistent formatting.
| return source.Name.EndsWith(DIFF_IGNORE_POSTFIX, StringComparison.OrdinalIgnoreCase); | |
| return source.Name.EndsWith(DIFF_IGNORE_POSTFIX, StringComparison.OrdinalIgnoreCase); |
| foreach (var source in _sources.Values) | ||
| { | ||
| if (!_matched.Contains(source.Attribute.Name)) | ||
| if (IsUnmatched(source.Attribute.Name)) |
There was a problem hiding this comment.
Missing method definition for 'IsUnmatched'. The code calls 'IsUnmatched(source.Attribute.Name)' but this method is not defined in the visible code.
No description provided.