Add FixType property to IFixCommonError - #14442
Open
ivandrofly wants to merge 1 commit into
Open
Conversation
Every fix rule now declares the kind of fix it performs via a new FixType enum (Time, Formatting, Dialog, Punctuation, Casing, Spacing, Characters, Ocr), so the UI/CLI can group, filter or sort rules by category later. The member is abstract on the interface so the compiler enforces it on all 40 implementations. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TTVPifejhQqpeh1mkQHeRg
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FixTypeenum (Time,Formatting,Dialog,Punctuation,Casing,Spacing,Characters,Ocr) insrc/libse/Enums.FixType FixType { get; }toIFixCommonError, so the compiler enforces it on every implementation.FixCommonOcrErrorsin the UI) declares the kind of fix it performs, so the UI and CLI can group, filter or sort rules by category.No behaviour change on its own; the first consumer is the "Type" filter in the Fix common errors window, stacked on this PR.
Test plan
dotnet build SubtitleEdit.slncompiles (everyIFixCommonErrorimplementation has the new member)FixCommasisPunctuation,FixShortGapsisTime,FixUnneededSpacesisSpacing,FixCommonOcrErrorsisOcrdotnet test tests/libse/LibSETests.csprojpasses🤖 Generated with Claude Code
https://claude.ai/code/session_01SXEWrgv5uAnSzDgxFupSHZ