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

Apropos creates useless regex when not passed a search #530

Closed
SevereOverfl0w opened this issue May 9, 2018 · 4 comments
Closed

Apropos creates useless regex when not passed a search #530

SevereOverfl0w opened this issue May 9, 2018 · 4 comments

Comments

@SevereOverfl0w
Copy link
Contributor

(not (:case-sensitive? msg))
(update-in [:var-query :search] #(format "(?i:%s)" %))

If there is no search this will generate (?i:null) which doesn't match much. It should do a when around the search first.

@bbatsov
Copy link
Member

bbatsov commented May 9, 2018

But isn't search mandatory? What exactly is apropos going to do without it?

@SevereOverfl0w
Copy link
Contributor Author

It's fully capable of working without it now, the var-query will return everything if no search is provided (excluding other filters such as metadata and test). For example, you should be able to use apropos to filter for all tests by using:

{:op "apropos" :var-query {"test?" 1}}

Not providing search is the same as having search set to #".*", but without the effort of actually running regex.

@MalloZup
Copy link

MalloZup commented Aug 5, 2019

autogenerated with https://github.com/MalloZup/doghub: issue inactive since 450 days. Please update the issue or close it

@bbatsov
Copy link
Member

bbatsov commented Feb 20, 2020

Fixed by #666. The PR of the Beast! 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants