only lint public stutter namings
This commit is contained in:
@@ -135,6 +135,7 @@ impl EarlyLintPass for EnumVariantNames {
|
|||||||
let item_name = item.ident.name.as_str();
|
let item_name = item.ident.name.as_str();
|
||||||
let item_name_chars = item_name.chars().count();
|
let item_name_chars = item_name.chars().count();
|
||||||
let item_camel = to_camel_case(&item_name);
|
let item_camel = to_camel_case(&item_name);
|
||||||
|
if item.vis == Visibility::Public {
|
||||||
if !in_macro(cx, item.span) {
|
if !in_macro(cx, item.span) {
|
||||||
if let Some(mod_camel) = self.modules.last() {
|
if let Some(mod_camel) = self.modules.last() {
|
||||||
// constants don't have surrounding modules
|
// constants don't have surrounding modules
|
||||||
@@ -151,6 +152,7 @@ impl EarlyLintPass for EnumVariantNames {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if let ItemKind::Enum(ref def, _) = item.node {
|
if let ItemKind::Enum(ref def, _) = item.node {
|
||||||
check_variant(cx, def, &item_name, item_name_chars, item.span);
|
check_variant(cx, def, &item_name, item_name_chars, item.span);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user