Commit Graph

18 Commits

Author SHA1 Message Date
Daniel Eades 592642a9e6 extend lints to include 'clippy::all' 2021-12-28 20:15:40 +00:00
Daniel Eades db16d13df4 add semicolons if nothing returned 2021-11-25 13:20:37 +00:00
Nick Mathewson af7c9d5a0b enable checked_conversions lint. 2021-10-09 16:53:13 -04:00
Nick Mathewson a5bfc3c963 Remove some planned items in add_warnings. 2021-10-09 16:52:54 -04:00
Nick Mathewson 557a0ff40b Move all crates into a `crates` subdirectory.
This will cause some pain for now, but now is really the best time
to do this kind of thing.
2021-08-27 09:53:09 -04:00
S0AndS0 b95513c5e6 Move "use_unwrap" lint from some to want list
And convert some `add_or_port` calls to use `SocketAddr` instead of
parse + unwrap on strings.

> Note, this last change is only for IPv4 addresses, for now, and only
> within tests.
2021-08-25 12:23:57 -07:00
Nick Mathewson ffc27999ef add_warning.py: explain what to do when no args are given 2021-08-18 08:56:44 -04:00
Nick Mathewson 0b6f638517 Add clippy::missing_panics_doc to add_warnings.py. 2021-08-18 08:53:58 -04:00
S0AndS0 484cc24856 Add the "implicit_clone" lint.
> Check `implicit_clone` section of Clippy documentation for details;
>
>   https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone

This adds, and addresses, the following Clippy configuration to crates;

    #![deny(clippy::implicit_clone)]

And moves related line within `maint/add_warning.py` file. My intent is to
mitigate extra edits after merging, so please let me know if I need to do this
last bit differently.
2021-08-17 11:49:39 -07:00
Nick Mathewson 9c6dd27ca1 Use add_warnings.py for clippy::cast_lossless 2021-08-13 11:36:14 -04:00
Nick Mathewson 79d9eac58c Add unnecessary_wraps to the big warning list. 2021-08-06 16:20:37 -04:00
YUAN LYU 92dbf20a76 Add clippy warn needless pass by value 2021-06-21 23:27:19 -04:00
YUAN LYU b830e81b7f Add clippy warn needless borrow 2021-06-21 21:34:40 -04:00
Nick Mathewson 62ee7f4acd Note a couple of more desired warnings. 2021-06-17 08:28:55 -04:00
Nick Mathewson 2102d2e2b5 Add noop_method_call warning.
This would have saved ahf and me a lot of confusion in debugging a
situation where we were cloning a reference of a type that didn't
implement Clone.
2021-05-27 14:32:29 -04:00
Nick Mathewson 745c90e92c Enable cargo_common_metadata warning. 2021-05-25 15:42:47 -04:00
Nick Mathewson 411e1b35e0 Add the "unreachable_pub" lint.
This is a somewhat obnoxious change in its scope and requirements,
but it makes it easier to understand what the real public and
private parts of our APIs are.
2021-05-18 13:45:39 -04:00
Nick Mathewson 4507f44b54 Add the little script I use to add warnings to crates. 2021-05-18 09:31:49 -04:00