style: make error messages idiomatic - #660
Open
oxura wants to merge 1 commit into
Open
Conversation
m4tx
requested changes
Sep 3, 2026
| #[error(transparent)] | ||
| Io(#[from] std::io::Error), | ||
| #[error("Redis error: {0}")] | ||
| #[error("redis error: {0}")] |
Member
There was a problem hiding this comment.
Redis is a project name, so we should keep it as is.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cot already follows Rust’s lowercase, punctuation-free error style in most places, but a few framework, CLI, form-validation, and JSON errors still used sentence casing or terminal periods.
This normalizes the remaining framework-owned
thiserrorandanyhowmessages, including multi-sentence CLI errors (where the sentence boundary remains), updates public examples to model the convention, and documents the rule inCONTRIBUTING.md. Built-in form and 404 display tests now pin the externally visible wording.Verification:
cargo +1.94.0 fmt --all -- --checkunknown-lintsallowed because Clippy 1.94 predates the upstreamunused_async_trait_impllint)The workspace integration run reached the existing CLI snapshot harness; five timestamp/color normalization snapshots differ in this local environment, while all non-snapshot suites and the changed packages pass.
Closes #647.