Add allow-print-in-tests config

Add a config, allow-print-in-tests, that can be set in clippy.toml which
allows the usage of `[e]print[ln]!` macros in tests.

Closes #9795
This commit is contained in:
Trevor Arjeski 2022-11-04 20:33:04 +03:00
parent 704e00cb75
commit ddcfff6d9a
7 changed files with 61 additions and 3 deletions

View file

@ -389,6 +389,10 @@ define_Conf! {
///
/// Whether `dbg!` should be allowed in test functions
(allow_dbg_in_tests: bool = false),
/// Lint: PRINT_STDOUT, PRINT_STDERR.
///
/// Whether print macros (ex. `println!`) should be allowed in test functions
(allow_print_in_tests: bool = false),
/// Lint: RESULT_LARGE_ERR.
///
/// The maximum size of the `Err`-variant in a `Result` returned from a function