summaryrefslogtreecommitdiff
path: root/tests/functional/e
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-12-20 10:23:43 +0100
committerGitHub <noreply@github.com>2021-12-20 10:23:43 +0100
commitcdb57a8bfef91df7771c339b95931184f81ef940 (patch)
treee8b168e3429e2d132664b5670bd879e0173beb17 /tests/functional/e
parent4f95e4d1db7bebe62aca1b757a54370b2546a33f (diff)
downloadpylint-git-cdb57a8bfef91df7771c339b95931184f81ef940.tar.gz
Ignore files with name that starts like an emacs lock files (#5554)
* 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>
Diffstat (limited to 'tests/functional/e')
-rw-r--r--tests/functional/e/.#emacs_file_lock.py4
-rw-r--r--tests/functional/e/.#emacs_file_lock_by_conf.py3
-rw-r--r--tests/functional/e/.#emacs_file_lock_by_conf.rc2
-rw-r--r--tests/functional/e/.#emacs_file_lock_redefined_conf.py3
-rw-r--r--tests/functional/e/.#emacs_file_lock_redefined_conf.rc2
-rw-r--r--tests/functional/e/.#emacs_file_lock_redefined_conf.txt1
6 files changed, 15 insertions, 0 deletions
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