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

Consider aligning file_names lint with unquoted imports proposal #5071

Open
munificent opened this issue Aug 20, 2024 · 0 comments
Open

Consider aligning file_names lint with unquoted imports proposal #5071

munificent opened this issue Aug 20, 2024 · 0 comments
Labels
lint-proposal new-language-feature set-core Affects a rule in the core Dart rule set status-pending type-enhancement A request for a change that isn't a bug

Comments

@munificent
Copy link
Member

The language team is working on a proposal to allow unquoted imports (and exports and probably parts) like:

import foo/bar.baz;

Since the import path isn't quoted, some file or directory names don't work if the lexer gets confused and thinks they are number literals. Also, the proposal specifically supports path components that are multiple dotted components like foo.bar.baz (largely because that's common inside google3).

As I understand it, the file_names lint currently only applies to the library's file name and not any directory names above it. Also, it (I think?) mostly ignores file paths that contain . (aside from the .dart). And I think it doesn't fire if a path name is only digits.

If that proposal goes forward (which is likely but not certain), it might be good to align the lint with the proposal's restrictions so that users can start fixing their file names before the feature ships.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lint-proposal new-language-feature set-core Affects a rule in the core Dart rule set status-pending type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants