Skip to content

refactor: Remove 2nd person from error messages#5567

Merged
max-sixty merged 1 commit intoPRQL:mainfrom
max-sixty:error-2nd-person
Nov 17, 2025
Merged

refactor: Remove 2nd person from error messages#5567
max-sixty merged 1 commit intoPRQL:mainfrom
max-sixty:error-2nd-person

Conversation

@max-sixty
Copy link
Copy Markdown
Member

Summary

  • Removed 2nd person pronouns (you/your) from all error messages
  • Used softer modal verbs like "might" for hint messages to maintain a friendly tone
  • Kept hard constraint errors as direct imperative statements (e.g., "X requires Y")
  • Added error message style guidelines to CLAUDE.md

Changes

Error messages updated:

  • lowering.rs: Changed hints to use "might be missing?" pattern
  • ast_expand.rs: Changed to imperative statements for self-equality operator constraints
  • resolver/types.rs: Changed function argument hint to use "might"
  • CLAUDE.md: Added "Error Messages" section with style guidelines

Examples:

  • ❌ "are you missing `from` statement?" → ✅ "`from` statement might be missing?"
  • ❌ "did you forget to specify the column name?" → ✅ "column name might be missing?"
  • ❌ "you can only use X" → ✅ "X requires Y"

Test plan

  • All 611 integration tests pass
  • All lints pass (prettier, ruff, cargo fmt, cargo clippy)
  • JavaScript/TypeScript binding tests pass
  • Python binding tests pass
  • Snapshot tests reviewed and updated
  • Documentation and playground builds successful

🤖 Generated with Claude Code

Error messages now avoid "you/your" language while maintaining a friendly
tone using modal verbs like "might" for hints. This improves the professional
feel while keeping messages approachable.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty max-sixty enabled auto-merge (squash) November 17, 2025 23:15
@max-sixty max-sixty merged commit 6b02381 into PRQL:main Nov 17, 2025
36 of 37 checks passed
@max-sixty max-sixty deleted the error-2nd-person branch November 17, 2025 23:21
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