Skip to content

Add FixType property to IFixCommonError - #14442

Open
ivandrofly wants to merge 1 commit into
SubtitleEdit:mainfrom
ivandrofly:feature/fix-common-errors-fixtype
Open

Add FixType property to IFixCommonError#14442
ivandrofly wants to merge 1 commit into
SubtitleEdit:mainfrom
ivandrofly:feature/fix-common-errors-fixtype

Conversation

@ivandrofly

Copy link
Copy Markdown
Member

Summary

  • Add a FixType enum (Time, Formatting, Dialog, Punctuation, Casing, Spacing, Characters, Ocr) in src/libse/Enums.
  • Add FixType FixType { get; } to IFixCommonError, so the compiler enforces it on every implementation.
  • Every fix rule (39 in libse plus FixCommonOcrErrors in 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.sln compiles (every IFixCommonError implementation has the new member)
  • Spot-check a few classes: FixCommas is Punctuation, FixShortGaps is Time, FixUnneededSpaces is Spacing, FixCommonOcrErrors is Ocr
  • dotnet test tests/libse/LibSETests.csproj passes

🤖 Generated with Claude Code

https://claude.ai/code/session_01SXEWrgv5uAnSzDgxFupSHZ

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
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.

1 participant