2016-05-05 12:26:09 +03:00
|
|
|
#require test-repo pyflakes hg10
|
2014-05-01 18:42:23 +04:00
|
|
|
|
2016-05-11 07:49:27 +03:00
|
|
|
$ . "$TESTDIR/helpers-testrepo.sh"
|
2013-07-01 22:48:55 +04:00
|
|
|
|
|
|
|
run pyflakes on all tracked files ending in .py or without a file ending
|
|
|
|
(skipping binary file random-seed)
|
2014-05-01 18:42:23 +04:00
|
|
|
|
2017-07-07 22:07:36 +03:00
|
|
|
$ cat > test.py <<EOF
|
|
|
|
> print(undefinedname)
|
|
|
|
> EOF
|
|
|
|
$ pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py"
|
|
|
|
test.py:1: undefined name 'undefinedname'
|
|
|
|
|
2017-07-13 01:27:56 +03:00
|
|
|
$ cd "`dirname "$TESTDIR"`"
|
2017-07-07 22:07:36 +03:00
|
|
|
|
2017-07-02 07:14:20 +03:00
|
|
|
$ testrepohg locate 'set:**.py or grep("^#!.*python")' \
|
2017-06-28 03:24:31 +03:00
|
|
|
> -X hgext/fsmonitor/pywatchman \
|
2017-02-10 05:44:32 +03:00
|
|
|
> -X mercurial/pycompat.py -X contrib/python-zstandard \
|
2016-07-17 17:18:04 +03:00
|
|
|
> 2>/dev/null \
|
2013-07-01 22:48:55 +04:00
|
|
|
> | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
|
2014-08-06 21:16:58 +04:00
|
|
|
|