From 867ed221da4bdaab2533856a82098c0888279304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Cortier?= <3809077+CBenoit@users.noreply.github.com> Date: Tue, 5 Aug 2025 05:12:59 -0400 Subject: [PATCH] docs: clarify STYLE.md (#910) For error messages: use proper abbreviation casing, e.g., IPv4 and IPv6 (not ipv4/ipv6). For inline comments, no period for brief comments (e.g., `// VER`, `// RSV`, `// ATYP`) --- STYLE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/STYLE.md b/STYLE.md index 5a3a91b6..85ee31d8 100644 --- a/STYLE.md +++ b/STYLE.md @@ -79,6 +79,8 @@ This is the convention adopted by the Rust project: - [Rust API Guidelines][api-guidelines-errors] - [std::error::Error][std-error-trait] +Also, use proper abbreviation casing, e.g., IPv4 and IPv6 (not ipv4/ipv6). + ```rust // GOOD "invalid X.509 certificate" @@ -278,6 +280,8 @@ let artifact_name = format!("{}.wasm", package.replace('-', "_")); **Rationale:** writing a sentence (or maybe even a paragraph) rather just "a comment" creates a more appropriate frame of mind. It tricks you into writing down more of the context you keep in your head while coding. +Exception: no period for brief comments (e.g., `// VER`, `// RSV`, `// ATYP`) + ### "Sentence per line" style For `.md` and `.adoc` files, prefer a sentence-per-line format, don't wrap lines.