-#![feature(plugin, non_ascii_idents)]
-#![plugin(clippy)]
-#![warn(clippy, pub_enum_variant_names)]
+#![warn(clippy::enum_variant_names)]
+#![allow(non_camel_case_types, clippy::upper_case_acronyms)]
enum FakeCallType {
- CALL, CREATE
+ CALL,
+ CREATE,
}
enum FakeCallType2 {
- CALL, CREATELL
+ CALL,
+ CREATELL,
}
enum Foo {
CallTypeDestroy,
}
-enum TwoCallType { // no error
+enum TwoCallType {
+ // no error
CallTypeCall,
CallTypeCreate,
}
ConstantLie,
}
-enum Two { // no error here
+enum Two {
+ // no error here
ConstantInt,
ConstantInfer,
}
WithOut,
}
-#[allow(pub_enum_variant_names)]
-mod allowed {
+#[allow(clippy::enum_variant_names)]
+pub mod allowed {
pub enum PubAllowed {
SomeThis,
SomeThat,
}
}
+// should not lint
+enum Pat {
+ Foo,
+ Bar,
+ Path,
+}
+
+// should not lint
+enum N {
+ Pos,
+ Neg,
+ Float,
+}
+
+// should not lint
+enum Peek {
+ Peek1,
+ Peek2,
+ Peek3,
+}
+
+// should not lint
+pub enum NetworkLayer {
+ Layer2,
+ Layer3,
+}
+
+// should lint suggesting `IData`, not only `Data` (see #4639)
+enum IDataRequest {
+ PutIData(String),
+ GetIData(String),
+ DeleteUnpubIData(String),
+}
+
+enum HIDataRequest {
+ PutHIData(String),
+ GetHIData(String),
+ DeleteUnpubHIData(String),
+}
+
fn main() {}