Skip to content

Commit ba363bd

Browse files
committed
Auto merge of #5901 - giraffate:add_reference_to_rustc_dev_guide, r=matthiaskrgr
Add reference to rustc-dev-guide about lint message I think it would be better to add lint message convention to documentation. I referred to #5888 and #5893. changelog: none
2 parents d5f5487 + 9f827ab commit ba363bd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/adding_lints.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,14 @@ impl EarlyLintPass for FooFunctions {
295295

296296
Running our UI test should now produce output that contains the lint message.
297297

298+
According to [the rustc-dev-guide], the text should be matter of fact and avoid
299+
capitalization and periods, unless multiple sentences are needed.
300+
When code or an identifier must appear in a message or label, it should be
301+
surrounded with single acute accents \`.
302+
298303
[check_fn]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.EarlyLintPass.html#method.check_fn
299304
[diagnostics]: https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/utils/diagnostics.rs
305+
[the rustc-dev-guide]: https://rustc-dev-guide.rust-lang.org/diagnostics.html
300306

301307
## Adding the lint logic
302308

0 commit comments

Comments
 (0)