Skip to content

Commit

Permalink
Add reference to rustc-dev-guide about lint message
Browse files Browse the repository at this point in the history
  • Loading branch information
giraffate committed Aug 13, 2020
1 parent 3337f79 commit 9f827ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/adding_lints.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,14 @@ impl EarlyLintPass for FooFunctions {

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

According to [the rustc-dev-guide], the text should be matter of fact and avoid
capitalization and periods, unless multiple sentences are needed.
When code or an identifier must appear in a message or label, it should be
surrounded with single acute accents \`.

[check_fn]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/trait.EarlyLintPass.html#method.check_fn
[diagnostics]: https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/utils/diagnostics.rs
[the rustc-dev-guide]: https://rustc-dev-guide.rust-lang.org/diagnostics.html

## Adding the lint logic

Expand Down

0 comments on commit 9f827ab

Please sign in to comment.