[PATCH 01 of 16] checkcode: only match pushd/popd as word
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Mon Apr 10 11:23:58 EDT 2017
There are 8 others tests case that I'll send after this series is in,
one call pull them from my wip repo:
hg pull --rev 847616b4cf07
https://www.mercurial-scm.org/repo/users/marmoute/mercurial
After that, I'll have 17 other test cases the lives in the evolve
extension around the computation of heads replacement (issue4354).
They will unlock the move in the core the modern code that fix issue4354.
On 04/10/2017 05:19 PM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1491836754 -7200
> # Mon Apr 10 17:05:54 2017 +0200
> # Node ID f45dcc85f9947b29109e27a20853a531be86f8dc
> # Parent e0dc40530c5aa514feb6a09cf79ab6a3aa2ec331
> # EXP-Topic exchange.obsmarkers
> # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
> # hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r f45dcc85f994
> checkcode: only match pushd/popd as word
>
> otherwise it partially match common words like "pushdestination".
>
> diff --git a/contrib/check-code.py b/contrib/check-code.py
> --- a/contrib/check-code.py
> +++ b/contrib/check-code.py
> @@ -100,7 +100,7 @@ def rephere(m):
>
> testpats = [
> [
> - (r'pushd|popd', "don't use 'pushd' or 'popd', use 'cd'"),
> + (r'\b(push|pop)d\b', "don't use 'pushd' or 'popd', use 'cd'"),
> (r'\W\$?\(\([^\)\n]*\)\)', "don't use (()) or $(()), use 'expr'"),
> (r'grep.*-q', "don't use 'grep -q', redirect to /dev/null"),
> (r'(?<!hg )grep.* -a', "don't use 'grep -a', use in-line python"),
>
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list