Skip to content

Add CLI flags for WmlComparerSettings options#102

Merged
JSv4 merged 1 commit intomainfrom
add-cli-comparison-flags
Feb 10, 2026
Merged

Add CLI flags for WmlComparerSettings options#102
JSv4 merged 1 commit intomainfrom
add-cli-comparison-flags

Conversation

@JSv4
Copy link
Owner

@JSv4 JSv4 commented Feb 10, 2026

Summary

  • Rework argument parsing in tools/redline/Program.cs to support -- flags alongside the 3 positional args
  • Maintain backward compatibility with legacy 4-arg format (<author> <orig> <mod> <out>)
  • Add flags for all WmlComparerSettings options: --detail-threshold, --case-insensitive, --detect-moves, --simplify-move-markup, --move-similarity-threshold, --move-minimum-word-count, --no-detect-format-changes, --no-conflate-spaces, --date-time
  • Use CultureInfo.InvariantCulture for double parsing to avoid locale issues
  • Error on unknown flags with helpful usage message
  • Update PrintUsage() help text to document all flags
  • Bump version to 1.1.0

Test plan

  • dotnet build compiles without errors
  • Legacy format still works: redline <author> <orig> <mod> <out>
  • New format works: redline <orig> <mod> <out> --author=Name --detect-moves
  • Unknown flags produce error + usage text
  • Python-Redlines integration tests pass with rebuilt binaries (verified locally, 21/21 pass)

Support --detail-threshold, --case-insensitive, --detect-moves,
--simplify-move-markup, --move-similarity-threshold,
--move-minimum-word-count, --no-detect-format-changes,
--no-conflate-spaces, and --date-time flags.

Rework argument parsing to partition into positional args and flags,
maintaining backward compatibility with legacy 4-arg format.
@JSv4 JSv4 merged commit d0601cd into main Feb 10, 2026
10 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.

1 participant