clutcher / bh

Issue tracker for Better Highlights Intellij IDEA plugin
7 stars 0 forks source link

Cognitive complexity settings are not persisted #53

Closed omniError closed 1 year ago

omniError commented 1 year ago

Using non-premium version, attempt to disable cognitive complexity. Window appears with text "Settings would be saved, but some functionality would not work without license." Dismissing this brings up the PhpStorm "Licenses" window.

PhpStorm 2023.1.4 Plugin version 2023.7.3

clutcher commented 1 year ago

@omniError

This message appears, if you:

If you will disable regexp checkbox and remove corresponding keywords - that message will stop bothering you.

Also as said in message all settings would be saved, so there should be no issue with disabling cognitive complexity.

omniError commented 1 year ago

The only thing I have enabled is a comment keyword, everything else including regex is disabled. When the last plugin update happened the new complexity setting was enabled. Trying to disable it causes the problem and the setting does not stay off after a restart.

clutcher commented 1 year ago

@omniError So the issue is that "enable complexity" checkbox is reenabled on IDE restart?

omniError commented 1 year ago

Yes, I never enabled it in the first place it just came that way during the upgrade I guess.

clutcher commented 1 year ago

@omniError Ok, I was able to reproduce it. Will work on fix, hopefully would be available for download in few days.

Just for my interest: can be something changed in complexity calculation/showing to make it usefull for you?

omniError commented 1 year ago

Thanks

It may be useful to me in other projects but not what I am working on right now.

clutcher commented 1 year ago

So it is a bug in serialization of settings in Jetbrains IDE. I was able to bypass it wigh minor hack, so fix would be in next release.