ekino / jcv-idea-plugin

IntelliJ IDEA plugin for an enhanced coding experience on JCV based projects.
https://plugins.jetbrains.com/plugin/13916-jcv
MIT License
7 stars 0 forks source link

"number_type" missing from the suggestions #17

Closed celcius112 closed 3 years ago

celcius112 commented 3 years ago

Hello, it seems like the number_type validator is missing from the suggestions in https://github.com/ekino/jcv-idea-plugin/blob/master/src/main/kotlin/com/ekino/oss/jcv/idea_plugin/suggestion/ValueToDefaultValidatorsSuggestion.kt.

I could provide a PR (it looks to be a trivial issue), but I heard in my oreillette that there are some big modifications incoming, so it might be better to wait for their merge before resolving this issue.

leomillon commented 3 years ago

Hello @celcius112

What do you mean by "is missing"? Because it is right there: https://github.com/ekino/jcv-idea-plugin/blob/master/src/main/kotlin/com/ekino/oss/jcv/idea_plugin/suggestion/ValueToDefaultValidatorsSuggestion.kt#L96

It is only suggested on JSON Number field values, so if you try this on a String literal value, you won't get it.

celcius112 commented 3 years ago

right sorry, I might be blind. however the suggestion still does not appear as expected, for instance: Screenshot 2020-12-10 at 14 26 19 Screenshot 2020-12-10 at 14 26 30 Screenshot 2020-12-10 at 14 28 01

leomillon commented 3 years ago

Oh right good catch!

This is indeed missing but there: https://github.com/ekino/jcv-idea-plugin/blob/master/src/main/kotlin/com/ekino/oss/jcv/idea_plugin/definition/TemplatedValidator.kt#L70

You can create a quick PR if you want it before the complete rewrite of the plugin (I cannot provide any release date right now).

leomillon commented 3 years ago

Fixed and released in 2.0.1.

Waiting for JetBrains publication approval :)