summaryrefslogtreecommitdiffstats
path: root/tools/lint/test/files/flake8
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /tools/lint/test/files/flake8
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/lint/test/files/flake8')
-rw-r--r--tools/lint/test/files/flake8/.flake84
-rw-r--r--tools/lint/test/files/flake8/bad.py5
-rw-r--r--tools/lint/test/files/flake8/custom/.flake84
-rw-r--r--tools/lint/test/files/flake8/custom/good.py5
-rw-r--r--tools/lint/test/files/flake8/ext/bad.configure2
-rw-r--r--tools/lint/test/files/flake8/subdir/exclude/bad.py5
-rw-r--r--tools/lint/test/files/flake8/subdir/exclude/exclude_subdir/bad.py5
7 files changed, 30 insertions, 0 deletions
diff --git a/tools/lint/test/files/flake8/.flake8 b/tools/lint/test/files/flake8/.flake8
new file mode 100644
index 0000000000..1933432319
--- /dev/null
+++ b/tools/lint/test/files/flake8/.flake8
@@ -0,0 +1,4 @@
+[flake8]
+max-line-length = 100
+exclude =
+ subdir/exclude,
diff --git a/tools/lint/test/files/flake8/bad.py b/tools/lint/test/files/flake8/bad.py
new file mode 100644
index 0000000000..9d9751c7eb
--- /dev/null
+++ b/tools/lint/test/files/flake8/bad.py
@@ -0,0 +1,5 @@
+# Unused import
+import distutils
+
+print("This is a line that is over 80 characters but under 100. It shouldn't fail.")
+print("This is a line that is over not only 80, but 100 characters. It should most certainly cause a failure.")
diff --git a/tools/lint/test/files/flake8/custom/.flake8 b/tools/lint/test/files/flake8/custom/.flake8
new file mode 100644
index 0000000000..cfe68833f2
--- /dev/null
+++ b/tools/lint/test/files/flake8/custom/.flake8
@@ -0,0 +1,4 @@
+[flake8]
+max-line-length=110
+ignore=
+ F401
diff --git a/tools/lint/test/files/flake8/custom/good.py b/tools/lint/test/files/flake8/custom/good.py
new file mode 100644
index 0000000000..7f9121a2ba
--- /dev/null
+++ b/tools/lint/test/files/flake8/custom/good.py
@@ -0,0 +1,5 @@
+# Unused import
+import distutils
+
+print("This is a line that is over 80 characters but under 100. It shouldn't fail.")
+print("This is a line that is over not only 80, but 100 characters. It should also not cause a failure.")
diff --git a/tools/lint/test/files/flake8/ext/bad.configure b/tools/lint/test/files/flake8/ext/bad.configure
new file mode 100644
index 0000000000..8214ebb3c0
--- /dev/null
+++ b/tools/lint/test/files/flake8/ext/bad.configure
@@ -0,0 +1,2 @@
+# unused import
+import os
diff --git a/tools/lint/test/files/flake8/subdir/exclude/bad.py b/tools/lint/test/files/flake8/subdir/exclude/bad.py
new file mode 100644
index 0000000000..9d9751c7eb
--- /dev/null
+++ b/tools/lint/test/files/flake8/subdir/exclude/bad.py
@@ -0,0 +1,5 @@
+# Unused import
+import distutils
+
+print("This is a line that is over 80 characters but under 100. It shouldn't fail.")
+print("This is a line that is over not only 80, but 100 characters. It should most certainly cause a failure.")
diff --git a/tools/lint/test/files/flake8/subdir/exclude/exclude_subdir/bad.py b/tools/lint/test/files/flake8/subdir/exclude/exclude_subdir/bad.py
new file mode 100644
index 0000000000..9d9751c7eb
--- /dev/null
+++ b/tools/lint/test/files/flake8/subdir/exclude/exclude_subdir/bad.py
@@ -0,0 +1,5 @@
+# Unused import
+import distutils
+
+print("This is a line that is over 80 characters but under 100. It shouldn't fail.")
+print("This is a line that is over not only 80, but 100 characters. It should most certainly cause a failure.")