From: Petr Lautrbach <plautrba@redhat.com>
To: selinux@vger.kernel.org
Subject: Re: [PATCH] run-flake8: Filter out ./.git/ directory
Date: Wed, 13 May 2020 17:10:55 +0200 [thread overview]
Message-ID: <20200513151055.GA184174@workstation> (raw)
In-Reply-To: <20200511120332.26029-1-plautrba@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]
On Mon, May 11, 2020 at 02:03:32PM +0200, Petr Lautrbach wrote:
> 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.
>
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
> Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>
Applied.
> ---
> scripts/run-flake8 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/run-flake8 b/scripts/run-flake8
> index 24b1202fde99..67cccfe99e5f 100755
> --- a/scripts/run-flake8
> +++ b/scripts/run-flake8
> @@ -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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-05-13 15:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 12:03 [PATCH] run-flake8: Filter out ./.git/ directory Petr Lautrbach
2020-05-12 19:32 ` Nicolas Iooss
2020-05-13 15:10 ` Petr Lautrbach [this message]
2020-05-13 15:53 ` William Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200513151055.GA184174@workstation \
--to=plautrba@redhat.com \
--cc=selinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.