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

Enable ElmIncompletePatternInspection inspection on the of keyword #784

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jfmengels
Copy link
Contributor

Very often I (and others) write a case expression like case x of and the plugin is able to infer that there are missing cases and which ones (or that you need a _ branch).

When I finish to write the of keyword, to make use of the inspection and automatic fixes, I have to go back to the case keyword. Instead, I'd like to have fixes from the of keyword where my editor cursor is at that moment. The of keyword is also more accessible by mouse because you can click anywhere on the line after the of keyword, but having to go to case requires more precision.

This PR makes the inspections available on case available also on of.

@pravdomil
Copy link
Contributor

see #757

@cies cies added the feature label Apr 3, 2024
@cies
Copy link
Contributor

cies commented Apr 3, 2024

I'll merge this. Nice improvement!

@cies cies added this to the 5.0.1 milestone Apr 3, 2024
@cies cies self-assigned this Apr 4, 2024
@jfmengels
Copy link
Contributor Author

One downside of this if I'm not mistaken, is that this duplicates the incomplete pattern error in the errors panel. Another possibility is to put the underline on the entire case ... of section (possibly spanning a lot of code).

If we could find a way to not duplicate the error, that would be nice 🤷‍♂️

@cies
Copy link
Contributor

cies commented Apr 10, 2024

@jfmengels Could you merge master into that branch? I fixed the CI :)

@cies
Copy link
Contributor

cies commented Apr 23, 2024

@jfmengels I've tried to merge this in the 5.0.1 branch (which itself is a branch off of master) and there are a bunch of tests that fail because of it, namely:

image

I have tried to fix them, but it started to take more time than I had available for it... I kind of hope you could take a look at it. :)

Best is to first merge master into this your branch, as most tests on master currently pass (a few I did not manage to fix yet and quite a few are "flaky").

@cies cies removed this from the 5.0.1 milestone Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants