Commit Graph

13 Commits

Author SHA1 Message Date
Peter Jaszkowiak
9f131e5a0b assertions_on_constants: ignore indirect cfg! 2022-04-13 22:47:08 -06:00
bors
786f874c34 New macro utils
changelog: none

Sorry, this is a big one. A lot of interrelated changes and I wanted to put the new utils to use to make sure they are somewhat battle-tested. We may want to divide some of the lint-specific refactoring commits into batches for smaller reviewing tasks. I could also split into more PRs.

Introduces a bunch of new utils at `clippy_utils::macros::...`. Please read through the docs and give any feedback! I'm happy to introduce `MacroCall` and various functions to retrieve an instance. It feels like the missing puzzle piece. I'm also introducing `ExpnId` from rustc as "useful for Clippy too". `@rust-lang/clippy`

Fixes #7843 by not parsing every node of macro implementations, at least the major offenders.

I probably want to get rid of `is_expn_of` at some point.
2022-01-04 22:32:02 +00:00
Andre Bogus
a4ede72b3d update most tests to 2021 edition 2021-10-30 14:50:53 +02:00
Ryan Levick
30c5c2ff03 Add s to non_fmt_panic 2021-07-06 20:12:56 +02:00
flip1995
ebe52869a3 Merge commit '61eb38aeda6cb54b93b872bf503d70084c4d621c' into clippyup 2021-07-01 18:17:38 +02:00
Mara Bos
0767a0f9c7 Fix/allow non_fmt_panic in clippy tests. 2021-02-03 23:15:51 +01:00
Matthias Seiffert
22f057972f Match any expr for panic message 2019-10-07 20:40:05 +02:00
Matthias Seiffert
72a5d7b612 Add message to replace assert!(false) help 2019-10-07 19:13:10 +02:00
flip1995
5b836e344c
Add test for debug_assert!(false) 2019-04-18 11:48:19 +02:00
flip1995
cb2d987ed4
Add tests for assertion_on_constants macro check 2019-02-05 19:37:54 +01:00
A.A.Abroskin
c771f339d7 allow assertions_on_constants for collapsible_if and missing_test_files 2019-01-23 17:58:33 +03:00
A.A.Abroskin
a9f8d3c8fd add assert(true/false, some message) tests 2019-01-09 21:30:47 +03:00
A.A.Abroskin
906b51637c change assert_checks to assertions_on_constants 2019-01-09 13:38:38 +03:00