Add deprecation test for old configuration entry

This commit is contained in:
Andy Caldwell 2022-06-09 16:11:19 +01:00
parent 66b46749e6
commit 56c9cc458d
No known key found for this signature in database
GPG Key ID: D4204541AC1D228D
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,6 @@
# that one is a warning
# Expect errors from these deprecated configs
cyclomatic-complexity-threshold = 2
blacklisted-names = [ "..", "wibble" ]
# that one is white-listed
[third-party]

View File

@ -1,5 +1,7 @@
warning: error reading Clippy's configuration file `$DIR/clippy.toml`: deprecated field `cyclomatic-complexity-threshold`. Please use `cognitive-complexity-threshold` instead
warning: error reading Clippy's configuration file `$DIR/clippy.toml`: deprecated field `blacklisted-names`. Please use `disallowed-names` instead
error: the function has a cognitive complexity of (3/2)
--> $DIR/conf_deprecated_key.rs:4:4
|
@ -9,5 +11,5 @@ LL | fn cognitive_complexity() {
= note: `-D clippy::cognitive-complexity` implied by `-D warnings`
= help: you could split it up into multiple smaller functions
error: aborting due to previous error; 1 warning emitted
error: aborting due to previous error; 2 warnings emitted