mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-12-23 12:26:46 +00:00
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`)
This commit is contained in:
parent
166b76010c
commit
867ed221da
1 changed files with 4 additions and 0 deletions
4
STYLE.md
4
STYLE.md
|
|
@ -79,6 +79,8 @@ This is the convention adopted by the Rust project:
|
||||||
- [Rust API Guidelines][api-guidelines-errors]
|
- [Rust API Guidelines][api-guidelines-errors]
|
||||||
- [std::error::Error][std-error-trait]
|
- [std::error::Error][std-error-trait]
|
||||||
|
|
||||||
|
Also, use proper abbreviation casing, e.g., IPv4 and IPv6 (not ipv4/ipv6).
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
// GOOD
|
// GOOD
|
||||||
"invalid X.509 certificate"
|
"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.
|
**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.
|
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
|
### "Sentence per line" style
|
||||||
|
|
||||||
For `.md` and `.adoc` files, prefer a sentence-per-line format, don't wrap lines.
|
For `.md` and `.adoc` files, prefer a sentence-per-line format, don't wrap lines.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue