mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
mixin support for camel_case_types
Fixes: https://github.com/dart-lang/linter/issues/2532 Change-Id: Icbc5c9ae4bd8b50c1a4471424bd9ae3d95299257 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352976 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Phil Quitslund <pquitslund@google.com>
This commit is contained in:
parent
c55a99c855
commit
22520f43f9
|
@ -60,6 +60,7 @@ class CamelCaseTypes extends LintRule {
|
|||
registry.addFunctionTypeAlias(this, visitor);
|
||||
registry.addEnumDeclaration(this, visitor);
|
||||
registry.addExtensionTypeDeclaration(this, visitor);
|
||||
registry.addMixinDeclaration(this, visitor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,4 +108,9 @@ class _Visitor extends SimpleAstVisitor<void> {
|
|||
void visitGenericTypeAlias(GenericTypeAlias node) {
|
||||
check(node.name);
|
||||
}
|
||||
|
||||
@override
|
||||
void visitMixinDeclaration(MixinDeclaration node) {
|
||||
check(node.name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,4 +76,12 @@ macro class a { }
|
|||
lint(12, 1),
|
||||
]);
|
||||
}
|
||||
|
||||
test_mixin_lowerCase() async {
|
||||
await assertDiagnostics(r'''
|
||||
mixin m { }
|
||||
''', [
|
||||
lint(6, 1),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue