run-flake8: Filter out ./.git/ directory
PATCH 1/1 run-flake8: Filter out ./.git/ directory
When a branch has '.py' suffix git creates a file with the same suffix and this file is found by the find . -name '*.py' command. Such files from './git' need to be filtered out.
Fixes:
$ PATH="$VIRTUAL_ENV/bin:$PATH" ./scripts/run-flake8
Analyzing 189 Python scripts
./.git/logs/refs/heads/semanage-test.py:1:42: E999 SyntaxError: invalid syntax
./.git/refs/heads/semanage-test.py:1:4: E999 SyntaxError: invalid syntax
The command "PATH="$VIRTUAL_ENV/bin:$PATH" ./scripts/run-flake8" exited with 1.--- scripts/run-flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/run-flake8 +1 -1
@@ -7,7 +7,7 @@ if [ $# -eq 0 ] ; then # Run on both files ending with .py and Python files without extension # shellcheck disable=SC2046 - set -- $( (find . -name '*.py' ; grep --exclude-dir=.git -l -e '^#!\s*/usr/bin/python' -e '^#!/usr/bin/env python' -r .) | sort -u ) + set -- $( (find . -name '*.py' ; grep -l -e '^#!\s*/usr/bin/python' -e '^#!/usr/bin/env python' -r .) | grep -v '^\./\.git/' | sort -u ) echo "Analyzing $# Python scripts" fi
Signature · 1 line
2.26.2
Quoted 7 lines · Petr Lautrbach
When a branch has '.py' suffix git creates a file with the same suffix and this file is found by the
find . -name '*.py'command. Such files from './git' need to be filtered out.Fixes:
Quoted 7 lines
$ PATH="$VIRTUAL_ENV/bin:$PATH" ./scripts/run-flake8 Analyzing 189 Python scripts ./.git/logs/refs/heads/semanage-test.py:1:42: E999 SyntaxError: invalid syntax ./.git/refs/heads/semanage-test.py:1:4: E999 SyntaxError: invalid syntax The command "PATH="$VIRTUAL_ENV/bin:$PATH" ./scripts/run-flake8" exited with 1.Signed-off-by Petr Lautrbach <[email protected]>
Thanks!
Nicolas
Quoted 20 lines
--- scripts/run-flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/run-flake8 +1
-2@@ -7,7 +7,7 @@ if [ $# -eq 0 ] ; then # Run on both files ending with .py and Python files without extension # shellcheck disable=SC2046 - set -- $( (find . -name '*.py' ; grep --exclude-dir=.git -l -e '^#!\s*/usr/bin/python' -e '^#!/usr/bin/env python' -r .) | sort -u ) + set -- $( (find . -name '*.py' ; grep -l -e '^#!\s*/usr/bin/python' -e '^#!/usr/bin/env python' -r .) | grep -v '^\./\.git/' | sort -u ) echo "Analyzing $# Python scripts" fi --2.26.2
Petr Lautrbach
AppliedQuoted 6 lines · Petr Lautrbach
When a branch has '.py' suffix git creates a file with the same suffix and this file is found by the
find . -name '*.py'command. Such files from './git' need to be filtered out.Fixes:
Quoted 8 lines
$ PATH="$VIRTUAL_ENV/bin:$PATH" ./scripts/run-flake8 Analyzing 189 Python scripts ./.git/logs/refs/heads/semanage-test.py:1:42: E999 SyntaxError: invalid syntax ./.git/refs/heads/semanage-test.py:1:4: E999 SyntaxError: invalid syntax The command "PATH="$VIRTUAL_ENV/bin:$PATH" ./scripts/run-flake8" exited with 1.Signed-off-by Petr Lautrbach <[email protected]>Acked-by Nicolas Iooss <[email protected]>
Applied.
Quoted 17 lines
--- scripts/run-flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/run-flake8 +1
-1@@ -7,7 +7,7 @@ if [ $# -eq 0 ] ; then # Run on both files ending with .py and Python files without extension # shellcheck disable=SC2046 - set -- $( (find . -name '*.py' ; grep --exclude-dir=.git -l -e '^#!\s*/usr/bin/python' -e '^#!/usr/bin/env python' -r .) | sort -u ) + set -- $( (find . -name '*.py' ; grep -l -e '^#!\s*/usr/bin/python' -e '^#!/usr/bin/env python' -r .) | grep -v '^\./\.git/' | sort -u ) echo "Analyzing $# Python scripts" fi
Signature · 2 lines
() ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
Quoted 14 lines · Petr Lautrbach
Quoted 12 lines · Petr Lautrbach
When a branch has '.py' suffix git creates a file with the same suffix and this file is found by the
find . -name '*.py'command. Such files from './git' need to be filtered out.Fixes:
$ PATH="$VIRTUAL_ENV/bin:$PATH" ./scripts/run-flake8 Analyzing 189 Python scripts ./.git/logs/refs/heads/semanage-test.py:1:42: E999 SyntaxError: invalid syntax ./.git/refs/heads/semanage-test.py:1:4: E999 SyntaxError: invalid syntax The command "PATH="$VIRTUAL_ENV/bin:$PATH" ./scripts/run-flake8" exited with 1.
Quoted 4 lines
Quoted 2 lines
Signed-off-by Petr Lautrbach <[email protected]>Acked-by Nicolas Iooss <[email protected]>Applied.
I updated the state to accepted in Patchwork
Quoted 22 lines
Quoted 10 lines
--- scripts/run-flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/run-flake8 +0
-0scripts/run-flake8 if [ $# -eq 0 ] ; then · line 13
Quoted 8 lines
scripts/run-flake8 +1
-1@@ -7,7 +7,7 @@ if [ $# -eq 0 ] ; then # Run on both files ending with .py and Python files without extension # shellcheck disable=SC2046 - set -- $( (find . -name '*.py' ; grep --exclude-dir=.git -l -e '^#!\s*/usr/bin/python' -e '^#!/usr/bin/env python' -r .) | sort -u ) + set -- $( (find . -name '*.py' ; grep -l -e '^#!\s*/usr/bin/python' -e '^#!/usr/bin/env python' -r .) | grep -v '^\./\.git/' | sort -u ) echo "Analyzing $# Python scripts" fi--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments