Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

prefer_single_quotes needs an automatic fix #47

Closed
Pacane opened this issue Jan 14, 2020 · 5 comments
Closed

prefer_single_quotes needs an automatic fix #47

Pacane opened this issue Jan 14, 2020 · 5 comments

Comments

@Pacane
Copy link

Pacane commented Jan 14, 2020

Since this rule is enabled by default in pedantic, my project has more than 6000 warnings.

Would it be an option to add a dartfmt fix for this, as there's no easy way to change it for us without analyzing each occurrence for an escaped single quote in the strings.

@bwilkerson
Copy link

Yes. The fix for prefer_single_quotes was added on 12/20.

In order to use it you'll need a version of the analysis server that's newer than that. Because the analysis server is shipped with the SDK, that typically means a version of the SDK that newer. I don't know whether there has been a release of the SDK since that date.

@awhitford
Copy link

How does one use the "fix"? I tried running dartfmt, but it does not address this issue. I am using Dart version 2.8.4 and Flutter version 1.17.3.

@Pacane
Copy link
Author

Pacane commented Jun 7, 2020 via email

@bwilkerson
Copy link

The fixes are also available in many editors, such as IntelliJ and VS Code.

@Pacane
Copy link
Author

Pacane commented Jun 8, 2020 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants