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

Fix dartfmt's IsAvailable() method. #225

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

malcolmr
Copy link
Member

d927656 changed the dartfmt_executable flag from a string to a list, but didn't change the use inside IsAvailable(), leading to:

Failed to evaluate whether formatter dartfmt is available: Vim(return):E730: Using a List as a String

The change uses the ResolveFlagToArray() helper in both IsAvailable() and FormatRange() (which incidentally also allows defining the flag using a Function), and updates the documentation for all flags using ResolveFlagToArray() to use the same phrasing.

Fixes #190.

d927656 changed the dartfmt_executable flag from a string to a list, but
didn't change the use inside IsAvailable(), leading to:

Failed to evaluate whether formatter dartfmt is available: Vim(return)
:E730: Using a List as a String

The change uses the ResolveFlagToArray() helper in both IsAvailable()
and FormatRange() (which incidentally also allows defining the flag
using a Function), and updates the documentation for all flags using
ResolveFlagToArray() to use the same phrasing.

Fixes google#190.
@malcolmr malcolmr requested a review from dbarnett August 15, 2023 14:00
@malcolmr
Copy link
Member Author

I'm not sure why the neovim tests are failing, but it doesn't seem to be due to this change. Unfortunately that looks like that failure also aborts the Vim tests, but those do pass locally.

@malcolmr malcolmr merged commit 03b8f30 into google:master Aug 22, 2023
2 of 4 checks passed
@malcolmr malcolmr deleted the fix-dartfmt-isavailable branch August 22, 2023 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dartfmt is deprecated
2 participants