zielu / GitToolBox

GitToolBox IntelliJ plugin
GNU General Public License v3.0
607 stars 75 forks source link

Message validation regular expression is not working as before #375

Closed frontendplace closed 1 year ago

frontendplace commented 2 years ago

after update version (2021-12-12T17:33:10.557744) previously accepted regexp : WK-\d{5} .* was working in message validation a comment starting with "WK-00000 some text" was accepted before but now not anymore

zielu commented 2 years ago

Hi, could you check commit validation plugin config on project level ? There might be an issue if you used checkbox in commit dialog. (https://github.com/zielu/GitToolBox/issues/358#issuecomment-993834570)

zielu commented 2 years ago

No feedback

frontendplace commented 2 years ago

Sorry for late response. Yes I use the checkbox in the check commit message in the project. As I have done before. Shouldn't I do that? The option checked: "Message matches pattern"

zielu commented 2 years ago

Ok I'll dive one more time into this

zielu commented 2 years ago

Can you enable logs from category #zielu.gittoolbox ? During validation there should be an entry like Validate commit message with expression. I'm curious what it will print.

https://github.com/zielu/GitToolBox/wiki/AdvancedManual#logging

frontendplace commented 2 years ago

This is in de log:

zielu.gittoolbox - Validate commit message with expression: '(?:fix|chore|docs|feat|refactor|style|test)(?:(.))?: [A-Z].\s#\d+'

This is what I have in the settings: in plugin: check pattern match: on , pattern: WK-\d{5}\s.* with a green checkmark after it

In commit dialog: before commit, message matches pattern: on

Commit message used: WK-00000 test Using webstorm 2021.3.1

I dont see the extra checkboxes in my dialog in settings'in my version of webstorm

zielu commented 2 years ago

Looks like this is the case of "funky checkboxes" - see #358. There are 2 levels on configuration - app and project - if you used checkbox from commit dialog to disable validation then a project override was created and it does not copy settings from app level. I'm working on a fix but it is surprisingly difficult issue.

frontendplace commented 2 years ago

I see now for the first time the extra project level override. I did not see that before and defaults to another setting I see that now