January 2019
Intermediate to advanced
520 pages
14h 32m
English
The clippy tool can be very annoying. To tighten or loosen checks, you can configure the tool using the clippy.toml configuration file.
For example, if we activate all lints with the -W clippy::pedantic argument, we can get a warning like this:
warning: you should put `MyCompany` between ticks in the documentation --> src/main.rs:8:29 |8 | /// This method connects to MyCompany API. | ^^^^^^^^^ | = note: `-W clippy::doc-markdown` implied by `-W clippy::pedantic` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
This happened because clippy thinks there is the name of a variable that we forget to include in ticks. To avoid this behavior, we can add an extra word to the ...
Read now
Unlock full access