mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
d203784d68
Summary: As the title. Test Plan: `arc unit` Reviewers: #sourcecontrol, stash, rmcelroy Reviewed By: stash, rmcelroy Subscribers: rmcelroy, stash, mjpieters Differential Revision: https://phabricator.intern.facebook.com/D4232321 Signature: t1:4232321:1480067588:54e91ece8fa6b5ff13b3ebc9279217c76bf96a24
23 lines
678 B
Perl
23 lines
678 B
Perl
#require test-repo pyflakes hg10
|
|
|
|
$ . $TESTDIR/require-core-hg.sh tests/filterpyflakes.py
|
|
|
|
This file is backported from mercurial/tests/test-check-pyflakes.t.
|
|
It differs slightly to fix paths.
|
|
|
|
$ . "$RUNTESTDIR/helpers-testrepo.sh"
|
|
$ cd "$TESTDIR"/..
|
|
|
|
run pyflakes on all tracked files ending in .py or without a file ending
|
|
(skipping binary file random-seed)
|
|
|
|
$ hg locate 'set:**.py or grep("^#!.*python")' > "$TESTTMP/files1"
|
|
$ if [ -n "$LINTFILES" ]; then
|
|
> printf "$LINTFILES" > "$TESTTMP/files2"
|
|
> join "$TESTTMP/files1" "$TESTTMP/files2"
|
|
> else
|
|
> cat "$TESTTMP/files1"
|
|
> fi \
|
|
> | xargs pyflakes 2>/dev/null | "$RUNTESTDIR/filterpyflakes.py"
|
|
|