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 lowercase_with_underscores library names and source files (Style Guide) #57164

Closed
pq opened this issue Feb 10, 2015 · 5 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. type-enhancement A request for a change that isn't a bug

Comments

@pq
Copy link
Member

pq commented Feb 10, 2015

DO name libraries and source files using lowercase_with_underscores.

Some file systems are not case-sensitive, so many projects require filenames to be all lowercase. Using a separate character allows names to still be readable in that form. Using underscores as the separator ensures that the name is still a valid Dart identifier, which may be helpful if the language later supports symbolic imports.

GOOD:

  • slider_menu.dart
  • file_system.dart
  • library peg_parser;

BAD:

  • SliderMenu.dart
  • filesystem.dart
  • library peg-parser;
@pq pq added the type-enhancement A request for a change that isn't a bug label Feb 10, 2015
@pq
Copy link
Member Author

pq commented Feb 14, 2015

Fixed with 8a5f09d

@satyapsr13
Copy link

image

i am getting frustrated with this blue message / recommendation? how to solve this?

@bwilkerson
Copy link
Member

That appears to be coming from the file_names lint.

@pq The highlight range should be fixed so that only the first character of the file is highlighted (or none of the characters).

But if you want to get rid of the lint, then you'll need to edit your analysis_options.yaml file to cause the lint to be ignored (I'm guessing that it's being enabled for you indirectly by including the core rule set.) See https://dart.dev/guides/language/analysis-options#disabling-individual-rules for instructions.

@satyapsr13
Copy link

@bwilkerson thankyou sir

@pq
Copy link
Member Author

pq commented Oct 11, 2021

@pq The highlight range should be fixed so that only the first character of the file is highlighted (or none of the characters).

💯

This is pretty bad as is. Working up a fix now.

@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
This issue was closed.
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. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants