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

Pass --compiler flag to elm-test when linting 0.19 tests #2225

Merged
merged 1 commit into from
Jan 27, 2019

Conversation

ravicious
Copy link
Contributor

This makes elm make linter work when elm is not installed globally.

let l:root_dir = ale_linters#elm#make#GetRootDir(a:buffer)
let l:is_v19 = ale_linters#elm#make#IsVersionGte19(a:buffer)
let l:is_using_elm_test = l:executable =~ "elm-test$"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case where ale_linters#elm#make#GetExecutable is supposed to use elm-test but elm-test is unavailable, it falls back to elm (1f21eb0). I don't know why exactly, presumably for the linter to still attempt to lint if somebody is editing files from within /tests folder?

elm doesn't support the --compiler flag and will crash if provided, so we have to check that first.

This makes elm make linter work when elm is not installed globally.
@w0rp w0rp merged commit a7b3b84 into dense-analysis:master Jan 27, 2019
@w0rp
Copy link
Member

w0rp commented Jan 27, 2019

Cheers! 🍻

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.

2 participants