GitToolBox icon indicating copy to clipboard operation
GitToolBox copied to clipboard

Message validation regular expression is not working as before

Open frontendplace opened this issue 4 years ago • 8 comments

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

frontendplace avatar Dec 16 '21 14:12 frontendplace

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 avatar Dec 17 '21 10:12 zielu

No feedback

zielu avatar Jan 28 '22 08:01 zielu

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"

frontendplace avatar Jan 28 '22 10:01 frontendplace

Ok I'll dive one more time into this

zielu avatar Jan 28 '22 12:01 zielu

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

zielu avatar Feb 03 '22 15:02 zielu

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

frontendplace avatar Feb 04 '22 09:02 frontendplace

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.

zielu avatar Feb 04 '22 12:02 zielu

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

frontendplace avatar Feb 09 '22 13:02 frontendplace