mirror of
https://github.com/joshuaclayton/unused.git
synced 2024-10-26 05:07:35 +03:00
97f083fc2c
Why? ==== ag supports using regular expressions for searches; however, the -Q flag, which was previously always used, resulted in literal search results. By searching literal matches, it would potentially return too many results. For example, with a `me` method in a controller, it'd match words like `awesome` or `method`. This introduces a check where, if the token being searched is only composed of word characters (`[A-Za-z0-9_]`), it'll switch over to use regular expressions with ag and surround the token with non-word matches on either end. The goal here is to reduce false-positives in matches. |
||
---|---|---|
.. | ||
Unused | ||
Spec.hs |