エラーメッセージの改善とREADMEの更新 #11
Merged
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.
概要
textlint-rule-ja-no-mixed-periodのエラーメッセージを改善し、ユーザーがエラーの理由と修正方法を理解しやすくしました。
背景・動機
従来のエラーメッセージは「文末が"。"で終わっていません。」という簡潔なものでしたが、以下の課題がありました:
変更内容
1. エラーメッセージの構造化
各エラーメッセージを以下の3つの要素で構成:
2. パターン別のメッセージ最適化
句点の付け忘れ
変更前:
変更後:
末尾の不要なスペース
変更前:
変更後:
ピリオドの使用
変更前:
変更後:
3. READMEの充実
以下のセクションを追加:
--fix
オプションの使用方法効果
テスト
既存のテストケースを新しいメッセージ形式に対応させました。すべてのテストが通過することを確認済みです。
破壊的変更
エラーメッセージの文言が変更されるため、エラーメッセージの文字列に依存した処理がある場合は影響を受ける可能性があります。ただし、エラーの検出ロジックや修正機能(
--fix
)に変更はありません。チェックリスト
🤖 Generated with Claude Code