File tree Expand file tree Collapse file tree 3 files changed +30
-4
lines changed Expand file tree Collapse file tree 3 files changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -873,15 +873,13 @@ The minimum rust version that the project supports. Defaults to the `rust-versio
873
873
* [ ` needless_borrow ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow )
874
874
* [ ` non_std_lazy_statics ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#non_std_lazy_statics )
875
875
* [ ` option_as_ref_deref ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref )
876
- * [ ` option_map_unwrap_or ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unwrap_or )
877
876
* [ ` ptr_as_ptr ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#ptr_as_ptr )
878
877
* [ ` question_mark ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#question_mark )
879
878
* [ ` redundant_field_names ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names )
880
879
* [ ` redundant_static_lifetimes ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes )
881
880
* [ ` repeat_vec_with_capacity ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#repeat_vec_with_capacity )
882
881
* [ ` same_item_push ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push )
883
882
* [ ` seek_from_current ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#seek_from_current )
884
- * [ ` seek_rewind ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#seek_rewind )
885
883
* [ ` to_digit_is_some ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#to_digit_is_some )
886
884
* [ ` transmute_ptr_to_ref ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#transmute_ptr_to_ref )
887
885
* [ ` tuple_array_conversions ` ] ( https://rust-lang.github.io/rust-clippy/master/index.html#tuple_array_conversions )
Original file line number Diff line number Diff line change @@ -775,15 +775,13 @@ define_Conf! {
775
775
needless_borrow,
776
776
non_std_lazy_statics,
777
777
option_as_ref_deref,
778
- option_map_unwrap_or,
779
778
ptr_as_ptr,
780
779
question_mark,
781
780
redundant_field_names,
782
781
redundant_static_lifetimes,
783
782
repeat_vec_with_capacity,
784
783
same_item_push,
785
784
seek_from_current,
786
- seek_rewind,
787
785
to_digit_is_some,
788
786
transmute_ptr_to_ref,
789
787
tuple_array_conversions,
Original file line number Diff line number Diff line change
1
+ #![ feature( rustc_private) ]
2
+
3
+ // This test checks that all lints defined in `clippy_config::conf` in `#[lints]`
4
+ // attributes exist as Clippy lints.
5
+ //
6
+ // This test is a no-op if run as part of the compiler test suite
7
+ // and will always succeed.
8
+
9
+ use std:: collections:: HashSet ;
10
+
11
+ #[ test]
12
+ fn config_consistency ( ) {
13
+ if option_env ! ( "RUSTC_TEST_SUITE" ) . is_some ( ) {
14
+ return ;
15
+ }
16
+
17
+ let lint_names: HashSet < String > = clippy_lints:: declared_lints:: LINTS
18
+ . iter ( )
19
+ . map ( |lint_info| lint_info. lint . name . strip_prefix ( "clippy::" ) . unwrap ( ) . to_lowercase ( ) )
20
+ . collect ( ) ;
21
+ for conf in clippy_config:: get_configuration_metadata ( ) {
22
+ for lint in conf. lints {
23
+ assert ! (
24
+ lint_names. contains( * lint) ,
25
+ "Configuration option {} references lint `{lint}` which does not exist" ,
26
+ conf. name
27
+ ) ;
28
+ }
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments