-
Notifications
You must be signed in to change notification settings - Fork 580
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
KeywordBear in 0.11 RC doesn't allow unsetting 'keywords' setting anymore #1689
Comments
Extremely urgent, we should dispatch this immediately. |
Also, once this is fixed, please check KeywordBear regex and non-regex performance, it seemed a bit off but it might be cause of this bug, and it was difficult to test it while this issue is still open. |
not a regression as it doesn't work with 0.10 and was obviously broken in 0.9. Still extremely urgent |
Triaged. This is an old KeywordBear problem where the empty Marking usability as it is a usecase issue. |
If a setting is used in the coafile and nothing is assigned, then the value of that key is an empty string ''. Now, since `keywords` is a `list`, `list('')` returns an empty list: `[]` which leads to construction of regex `r'()'` which matches every character, and hence produces false results. Fixes coala#1689
If a setting is used in the coafile and nothing is assigned, then the value of that key is an empty string ''. Now, since `keywords` is a `list`, `list('')` returns an empty list: `[]` which leads to construction of regex `r'()'` which matches every character, and hence produces false results. Fixes coala#1689
Copy, paste from commit message: If a setting is used in the coafile and nothing is assigned, then the value of that key is an empty string ''. Now, since |
Shouldn't we patch the parser instead to consider empty strings to be an empty list? |
@Makman2 here an empty list is created, so, no. ;) |
If setting keyword is used in coafile and not assigned, then keywords is an empty list, which leads to construction of regex `r'()'` which matches all the letters, hence yielding false results. Fixes coala#1689
ah nvm have misunderstood your comment above 👍 |
If setting keyword is used in coafile and not assigned, then keywords is an empty list, which leads to construction of regex `r'()'` which matches all the letters, hence yielding false results. Fixes coala#1689
If setting keyword is used in coafile and not assigned, then keywords is an empty list, which leads to construction of regex `r'()'` which matches all the letters, hence yielding false results. Fixes coala#1689
Note , the bug fixed in #1690, and backported in #1695 , also occurred in 0.10, and it appears to have also occurred in 0.9 from my limited testing. @underyx , if you are experiencing a regression in 0.11 RC, which version did this work correctly? This is tightly related to coala/coala#4116 (unsetting default settings). |
@jayvdb: I found the issue in |
Oh nooo, sorry, @jayvdb, I just realized that repo uses the |
Ah, that makes much more sense, as I can reproduce this bug on 0.9. |
yup; confirmed. the regression happened at bfd61fb, and the fix applied in above PRs is correct for that regression. |
If setting keyword is used in coafile and not assigned, then keywords is an empty list, which leads to construction of regex `r'()'` which matches all the letters, hence yielding false results. Fixes coala#1689
closing issue as discussion has been resolved. |
If setting keyword is used in coafile and not assigned, then keywords is an empty list, which leads to construction of regex `r'()'` which matches all the letters, hence yielding false results. Fixes coala#1689
Try this
.coafile
:Instead of yielding 0 results as expected, it will yield 907; one for each occurrence of the empty string.
Pinging @Mixih since it's a release blocker I assume.
The text was updated successfully, but these errors were encountered: