rust/clippy_lints
phil 3fa3bd8e94 Don't fail for raw string ending in \n
Pass tests for #3778, {print,write}_with_newline false positive

This change guards the lint from checking newlines with a sort of complicated
check to see if it's a raw string. Raw strings shouldn't be newline-checked,
since r"\n" is literally \-n, not a newline. I think it's ok not to check for
_literal_ newlines at the end of raw strings, but maybe that's debatable.

I... don't think this code is that great. I wanted to write the check after
`check_tts`, but that was too late -- raw string type info is lost (or I
couldn't find it). Putting it inside `check_tts` feels heavy-duty and the check
itself feels like a brittle reach possibly into places it shouldn't.

Maybe someone can fix this up :)
2019-02-18 11:39:40 -05:00
..
src Don't fail for raw string ending in \n 2019-02-18 11:39:40 -05:00
Cargo.toml chore(cargo/dependencies/cargo-metadata): Upgrade to 0.7.1 2019-01-25 21:53:44 +01:00
README.md rust-lang-nursery/rust-clippy => rust-lang/rust-clippy 2018-11-22 04:40:09 +01:00

This crate contains Clippy lints. For the main crate, check crates.io or GitHub.