Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

improve messages in specified to prefer "dearu" or "desumasu" #50

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

daiksud
Copy link
Contributor

@daiksud daiksud commented Oct 4, 2024

このPRは

"である"または"ですます"を明示的に指定した場合のエラーメッセージを改善します。

closes #49

改善方針

メッセージ生成部分において、"である"調向けと"ですます"調向けの判定による分岐だけでなく「優先指定がされているかどうか」も分岐として加えました。

また、従来のif文中で直接returnする書き方だと、コピペっぽいコードが4つも並んでしまい不格好だったため、Total:以下の共通箇所を切り出し、最後にreturnするようにしました。

テスト

テストケースも修正し、パスできていることは確認しています。

Copy link
Member

@azu azu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます

@azu azu added the Type: Bug Bug or Bug fixes label Oct 4, 2024
@azu azu changed the title feat(outputMessage): improve messages in specified to prefer "dearu" or "desumasu" improve messages in specified to prefer "dearu" or "desumasu" Oct 4, 2024
@azu azu merged commit 448f171 into textlint-ja:master Oct 4, 2024
2 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

エラーメッセージの改善2
2 participants