rust-clippy/tests
bors 1e656d8d6d Auto merge of #10970 - y21:read_line_without_trim, r=giraffate
new lint: `read_line_without_trim`

This adds a new lint that checks for calls to `Stdin::read_line` with a reference to a string that is then attempted to parse into an integer type without first trimming it, which is always going to fail at runtime.
This is something that I've seen happen a lot to beginners, because it's easy to run into when following the example of chapter 2 in the book where it shows how to program a guessing game.
It would be nice if we could point beginners to clippy and tell them "let's see what clippy has to say" and have clippy explain to them why it fails 👀

I think this lint can later be "generalized" to work not just for `Stdin` but also any `BufRead` (which seems to be where the guarantee about the trailing newline comes from) and also, matching/comparing it to a string slice that doesn't end in a newline character (e.g. `input == "foo"` is always going to fail)

changelog: new lint: [`read_line_without_trim`]
2023-07-05 00:13:59 +00:00
..
test_utils Revert "Dogfood missing_assert_message on Clippy" 2023-03-08 08:51:50 +00:00
ui Auto merge of #10970 - y21:read_line_without_trim, r=giraffate 2023-07-05 00:13:59 +00:00
ui-cargo Update tests 2023-06-26 14:13:07 +00:00
ui-internal Merge remote-tracking branch 'upstream/master' into rustup 2023-06-30 16:09:06 +02:00
ui-toml change category and refactor 2023-06-27 05:16:40 -05:00
workspace_test Fix false positive of [self_named_module_files] and [mod_module_files] 2023-06-18 09:04:59 +08:00
check-fmt.rs
clippy.toml
compile-test.rs Auto merge of #10920 - blyxyas:speedtest, r=llogiq 2023-07-02 15:48:50 +00:00
dogfood.rs Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup 2023-05-05 17:45:49 +02:00
headers.rs Add a test that checks for old style test headers 2023-04-23 14:20:55 +00:00
integration.rs Revert "Dogfood missing_assert_message on Clippy" 2023-03-08 08:51:50 +00:00
lint_message_convention.rs new lint needless_raw_string + refactor a bit 2023-06-27 05:12:00 -05:00
missing-test-files.rs Port clippy away from compiletest to ui_test 2023-06-26 14:13:07 +00:00
versioncheck.rs Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyup 2022-12-17 14:12:54 +01:00
workspace.rs Fix false positive of [self_named_module_files] and [mod_module_files] 2023-06-18 09:04:59 +08:00