Skip to content

Commit 56c9cc4

Browse files
committed
Add deprecation test for old configuration entry
1 parent 66b4674 commit 56c9cc4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/ui-toml/conf_deprecated_key/clippy.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# that one is a warning
1+
# Expect errors from these deprecated configs
22
cyclomatic-complexity-threshold = 2
3+
blacklisted-names = [ "..", "wibble" ]
34

45
# that one is white-listed
56
[third-party]

tests/ui-toml/conf_deprecated_key/conf_deprecated_key.stderr

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
warning: error reading Clippy's configuration file `$DIR/clippy.toml`: deprecated field `cyclomatic-complexity-threshold`. Please use `cognitive-complexity-threshold` instead
22

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

12-
error: aborting due to previous error; 1 warning emitted
14+
error: aborting due to previous error; 2 warnings emitted
1315

0 commit comments

Comments
 (0)