Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint for UpperCamelCase classes intended as metadata annotations (Style Guide). #57163

Closed
pq opened this issue Feb 10, 2015 · 2 comments
Closed
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-lint-request type-enhancement A request for a change that isn't a bug

Comments

@pq
Copy link
Member

pq commented Feb 10, 2015

DO use UpperCamelCase names for classes intended to be used in metadata annotations.

If the annotation takes no parameters, you might want to create a lowerCamelCase constant for it.

GOOD:

@Foo(anArg)
class A { ... }

@Foo()
class B { ... }

@foo
class C { ... }
@dikmax
Copy link

dikmax commented Dec 8, 2016

I think this issue is covered by 'constant_identifier_names' and 'camel_case_types' rules.

@pq
Copy link
Member Author

pq commented Apr 10, 2023

@dikmax is spot on.

@pq pq closed this as completed Apr 10, 2023
@devoncarew devoncarew added analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-lang/linter Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-linter Issues with the analyzer's support for the linter package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. linter-lint-request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants