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

proposal: remove_library_names #59023

Closed
kevmoo opened this issue Jan 31, 2023 · 2 comments
Closed

proposal: remove_library_names #59023

kevmoo opened this issue Jan 31, 2023 · 2 comments
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-proposal linter-set-recommended linter-status-pending

Comments

@kevmoo
Copy link
Member

kevmoo commented Jan 31, 2023

remove_library_names

Description

This is a corollary to unnecessary_library_directive. If you need a library directive, it almost certainly shouldn't have a name. The names really don't offer anything.

Kind

Style, mostly.

Bad Examples

@annotatedLibrary
/// With a comment
library but_a_pointless_name;

Good Examples

@annotatedLibrary
/// With a comment
library;

Discussion

See https://dart-lang.github.io/linter/lints/unnecessary_library_directive.html
And https://dart-lang.github.io/linter/lints/library_annotations.html
And https://dart-lang.github.io/linter/lints/dangling_library_doc_comments.html

Aligns with https://dart.dev/guides/language/effective-dart/style#dont-explicitly-name-libraries

@srawlins
Copy link
Member

Duplicate of #58950?

@kevmoo
Copy link
Member Author

kevmoo commented Jan 31, 2023

Duplicate of #58950?

Yes!!!

@kevmoo kevmoo closed this as completed Jan 31, 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 19, 2024
@devoncarew devoncarew transferred this issue from dart-lang/linter Nov 19, 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-proposal linter-set-recommended linter-status-pending
Projects
None yet
Development

No branches or pull requests

3 participants