Skip to content
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

Search for [^A-Za-z0-9] instead of the unsupported \W #350

Merged
merged 3 commits into from Mar 23, 2018
Merged

Search for [^A-Za-z0-9] instead of the unsupported \W #350

merged 3 commits into from Mar 23, 2018

Conversation

iBug
Copy link
Member

@iBug iBug commented Mar 17, 2018

MS has commented a lot of "0 TPs, 0 FPs", in Smokey's PRs. This should fix that wrong search.

P.S. This is my absolutely first lines of Ruby code so there may be very stupid syntax or usage errors. Please check them, Thanks.

@iBug
Copy link
Member Author

iBug commented Mar 17, 2018

I'm not sure what code I wrote actually. I hope a Ruby developer understand my intention. lol.

@@ -85,6 +85,7 @@ def pull_request_hook

keywords.each do |keyword|
keyword = keyword[0]
keyword.gsub! '\W', '[ -]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does [^A-Za-z0-9] work? If so, we should use that since it’s more correct.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an underscore to that class, but yeah

@iBug
Copy link
Member Author

iBug commented Mar 18, 2018

@ArtOfCode- @j-f1 Yep. Changes made.

@iBug iBug changed the title Search for [ -] instead of the unsupported \W Search for [^A-Za-z0-9] instead of the unsupported \W Mar 18, 2018
@ArtOfCode-
Copy link
Member

Note: I do intend to review this, but a scroll through the changes tab doesn't give me confidence it's going to work... search is complicated and I'd like to actually pull and test locally before I give this a pass.

@j-f1
Copy link
Contributor

j-f1 commented Mar 23, 2018

Does the LIKEREGEXP change add native support for \W?

@iBug
Copy link
Member Author

iBug commented Mar 23, 2018

@j-f1 I'm afraid it's because MySQL does not support \W at all...

@ArtOfCode- ArtOfCode- merged commit 3144ff4 into Charcoal-SE:master Mar 23, 2018
@iBug iBug deleted the patch-1 branch March 24, 2018 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants