Skip to content

use preferred quote-style when generating imports #49559

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

Closed
pq opened this issue Jul 28, 2022 · 8 comments
Closed

use preferred quote-style when generating imports #49559

pq opened this issue Jul 28, 2022 · 8 comments
Labels
devexp-linter Issues with the analyzer's support for the linter package devexp-quick-fix Issues with analysis server (quick) fixes legacy-area-analyzer Use area-devexp instead. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@pq
Copy link
Member

pq commented Jul 28, 2022

Import quote style should agree with enabled lints.

  • prefer_single_quotes vs.
  • prefer_double_quotes

I'm inclined to think the unspecified default should be single quotes (current behavior).

/fyi @lrhn

@pq pq added legacy-area-analyzer Use area-devexp instead. P3 A lower priority bug or feature request devexp-linter Issues with the analyzer's support for the linter package devexp-quick-fix Issues with analysis server (quick) fixes labels Jul 28, 2022
@bwilkerson
Copy link
Member

Agreed. As far as I can remember, there have been no complaints about the default.

@lrhn
Copy link
Member

lrhn commented Jul 31, 2022

One possible alternative is to use the quoting of existing imports, if there are any, and only fall back on single quotes if there are no imports at all.

@bwilkerson
Copy link
Member

Yes, that's another valid signal. I think that if there's a signal in the form of an enabled lint that that should take precedence over the signal from existing code, but the signal from existing code should take precedence over the default.

copybara-service bot pushed a commit that referenced this issue Sep 21, 2022
Bug #49559

Change-Id: Ib77ea67bb1ea15bfabb1c717cfb5abf13fd6d3cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259720
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Brian Wilkerson <[email protected]>
@asashour
Copy link
Contributor

https://dart-review.googlesource.com/c/sdk/+/260520

"Generating imports" is finished, but the issue scope would be increased to also support "generating strings"

@asashour
Copy link
Contributor

https://dart-review.googlesource.com/c/sdk/+/260523

I am not sure where else "generating string" should be tackled.

@bwilkerson
Copy link
Member

I'm not sure either. We can either look at every refactoring and correction producer, or wait for user feedback.

copybara-service bot pushed a commit that referenced this issue Sep 23, 2022
Bug: #49559
Change-Id: Iec3eea9915e0f4093aad8caa3fc8635081f3f9db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260523
Commit-Queue: Brian Wilkerson <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
copybara-service bot pushed a commit that referenced this issue Sep 23, 2022
Bug: #49559
Change-Id: Ic9c272c78f15599c5f3c985466f815cec82ad62b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260520
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Brian Wilkerson <[email protected]>
@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Mar 14, 2024
@FMorschel
Copy link
Contributor

I see that both CL's have been merged. Maybe I lost something here but I don't think there is anything that this issue is tracking still. Can this be closed, @pq?

@pq
Copy link
Member Author

pq commented Oct 30, 2024

Yes, thanks!

@pq pq closed this as completed Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-linter Issues with the analyzer's support for the linter package devexp-quick-fix Issues with analysis server (quick) fixes legacy-area-analyzer Use area-devexp instead. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants