From cdb57a8bfef91df7771c339b95931184f81ef940 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Mon, 20 Dec 2021 10:23:43 +0100 Subject: Ignore files with name that starts like an emacs lock files (#5554) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix 'path' shadowing variable from outer scope * Ignore file that starts like emacs's file lock Closes #367 Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> --- tests/functional/e/.#emacs_file_lock.py | 4 ++++ tests/functional/e/.#emacs_file_lock_by_conf.py | 3 +++ tests/functional/e/.#emacs_file_lock_by_conf.rc | 2 ++ tests/functional/e/.#emacs_file_lock_redefined_conf.py | 3 +++ tests/functional/e/.#emacs_file_lock_redefined_conf.rc | 2 ++ tests/functional/e/.#emacs_file_lock_redefined_conf.txt | 1 + 6 files changed, 15 insertions(+) create mode 100644 tests/functional/e/.#emacs_file_lock.py create mode 100644 tests/functional/e/.#emacs_file_lock_by_conf.py create mode 100644 tests/functional/e/.#emacs_file_lock_by_conf.rc create mode 100644 tests/functional/e/.#emacs_file_lock_redefined_conf.py create mode 100644 tests/functional/e/.#emacs_file_lock_redefined_conf.rc create mode 100644 tests/functional/e/.#emacs_file_lock_redefined_conf.txt (limited to 'tests/functional/e') diff --git a/tests/functional/e/.#emacs_file_lock.py b/tests/functional/e/.#emacs_file_lock.py new file mode 100644 index 000000000..b2674f414 --- /dev/null +++ b/tests/functional/e/.#emacs_file_lock.py @@ -0,0 +1,4 @@ +# The name is invalid, but we should not analyse this file +# Because its filename reseambles an emacs file lock ignored by default +# https://www.gnu.org/software/emacs/manual/html_node/elisp/File-Locks.html +# See https://github.com/PyCQA/pylint/issues/367 diff --git a/tests/functional/e/.#emacs_file_lock_by_conf.py b/tests/functional/e/.#emacs_file_lock_by_conf.py new file mode 100644 index 000000000..151168cc8 --- /dev/null +++ b/tests/functional/e/.#emacs_file_lock_by_conf.py @@ -0,0 +1,3 @@ +# The name is invalid, but we should not analyse this file +# Because it resembles an emacs file lock and is ignored by the configuration +# See https://github.com/PyCQA/pylint/issues/367 diff --git a/tests/functional/e/.#emacs_file_lock_by_conf.rc b/tests/functional/e/.#emacs_file_lock_by_conf.rc new file mode 100644 index 000000000..4140338cd --- /dev/null +++ b/tests/functional/e/.#emacs_file_lock_by_conf.rc @@ -0,0 +1,2 @@ +[MASTER] +ignore-patterns=^\.# diff --git a/tests/functional/e/.#emacs_file_lock_redefined_conf.py b/tests/functional/e/.#emacs_file_lock_redefined_conf.py new file mode 100644 index 000000000..4b26dee73 --- /dev/null +++ b/tests/functional/e/.#emacs_file_lock_redefined_conf.py @@ -0,0 +1,3 @@ +# [invalid-name] +# The name is invalid and we should analyse this file +# as ignore-patterns is redefined in the configuration diff --git a/tests/functional/e/.#emacs_file_lock_redefined_conf.rc b/tests/functional/e/.#emacs_file_lock_redefined_conf.rc new file mode 100644 index 000000000..76cd083fd --- /dev/null +++ b/tests/functional/e/.#emacs_file_lock_redefined_conf.rc @@ -0,0 +1,2 @@ +[MASTER] +ignore-patterns="" diff --git a/tests/functional/e/.#emacs_file_lock_redefined_conf.txt b/tests/functional/e/.#emacs_file_lock_redefined_conf.txt new file mode 100644 index 000000000..52050dcc8 --- /dev/null +++ b/tests/functional/e/.#emacs_file_lock_redefined_conf.txt @@ -0,0 +1 @@ +invalid-name:1:0:None:None::Module name "#emacs_file_lock_redefined_conf" doesn't conform to snake_case naming style:HIGH -- cgit v1.2.1