You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the reason I want to make pcre less special is due to the complexity maintained here and some oddities about cygwin compiled binaries (our tests for pcre are xfailed on windows despite it providing a grep binary which responds to -P and for the most part works)
pcre hooks are pretty powerful -- I've written a few of them (usually hooks specific to certain projects) because they're cheap and easy (and I probably wouldn't have taken the time to write them if it was harder than just an entry in .pre-commit-config.yaml). I think they're a pretty cool feature.
Would a simple Python implementation that basically runs re.search on the file contents be enough? It's not quite pcre (so, probably a breaking change), but I think that'd be preferable to dropping regex matching entirely.
On Jan 2, 2017 12:41 PM, "Chris Kuehl" ***@***.***> wrote:
pcre hooks are pretty powerful -- I've written a few of them (usually
hooks specific to certain projects) because they're cheap and easy (and I
probably wouldn't have taken the time to write them if it was harder than
just an entry in .pre-commit-config.yaml). I think they're a pretty cool
feature.
Would a simple Python implementation that basically runs re.search on the
file contents be enough? It's not quite pcre (so, probably a breaking
change), but I think that'd be preferable to dropping regex matching
entirely.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#404 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABugn2n8Qk6BzGdjoMnlsJo8fKOyT2u9ks5rOTa4gaJpZM4JvfN7>
.
Activity
Lucas-C commentedon Dec 19, 2016
Relying on standard Unix system commands won't make
pre-commitvery Windows-friendly.asottile commentedon Dec 19, 2016
That wouldn't be a regression, pcre hooks run
grep -Pon windows right now:pre-commit/pre_commit/languages/pcre.py
Line 9 in 8837cfa
Most of the reason I want to make pcre less special is due to the complexity maintained here and some oddities about cygwin compiled binaries (our tests for pcre are xfailed on windows despite it providing a grep binary which responds to -P and for the most part works)
Lucas-C commentedon Jan 2, 2017
I understand. But maybe we could emulate
grepin Python ? It think that would not mean adding much code, and would be really more robust and testable.chriskuehl commentedon Jan 2, 2017
pcre hooks are pretty powerful -- I've written a few of them (usually hooks specific to certain projects) because they're cheap and easy (and I probably wouldn't have taken the time to write them if it was harder than just an entry in
.pre-commit-config.yaml). I think they're a pretty cool feature.Would a simple Python implementation that basically runs
re.searchon the file contents be enough? It's not quite pcre (so, probably a breaking change), but I think that'd be preferable to dropping regex matching entirely.asottile commentedon Jan 2, 2017