summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pylint/test/functional/bad_builtin.py3
-rw-r--r--pylint/test/functional/bad_builtin.txt1
-rw-r--r--pylint/test/functional/bad_exception_context.py (renamed from pylint/test/input/func_bad_exception_context_py30.py)6
-rw-r--r--pylint/test/functional/bad_exception_context.rc2
-rw-r--r--pylint/test/functional/bad_exception_context.txt3
-rw-r--r--pylint/test/functional/bad_staticmethod_argument.py16
-rw-r--r--pylint/test/functional/bad_staticmethod_argument.txt2
-rw-r--r--pylint/test/functional/blacklisted_name.py4
-rw-r--r--pylint/test/functional/blacklisted_name.txt1
-rw-r--r--pylint/test/functional/dangerous_default_value.py (renamed from pylint/test/input/func_dangerous_default.py)33
-rw-r--r--pylint/test/functional/dangerous_default_value.rc2
-rw-r--r--pylint/test/functional/dangerous_default_value.txt14
-rw-r--r--pylint/test/functional/dangerous_default_value_py30.py79
-rw-r--r--pylint/test/functional/dangerous_default_value_py30.rc2
-rw-r--r--pylint/test/functional/dangerous_default_value_py30.txt14
-rw-r--r--pylint/test/functional/eval_used.py11
-rw-r--r--pylint/test/functional/eval_used.txt4
-rw-r--r--pylint/test/functional/fixme.py (renamed from pylint/test/input/func_fixme.py)11
-rw-r--r--pylint/test/functional/fixme.txt5
-rw-r--r--pylint/test/functional/function_redefined.py (renamed from pylint/test/input/func_w0102.py)10
-rw-r--r--pylint/test/functional/function_redefined.txt5
-rw-r--r--pylint/test/functional/interface_not_implemented.py (renamed from pylint/test/input/func_r0923.py)6
-rw-r--r--pylint/test/functional/interface_not_implemented.txt1
-rw-r--r--pylint/test/functional/invalid_name.py3
-rw-r--r--pylint/test/functional/invalid_name.txt1
-rw-r--r--pylint/test/functional/invalid_sequence_index.py (renamed from pylint/test/input/func_invalid_sequence_index.py)44
-rw-r--r--pylint/test/functional/invalid_sequence_index.txt20
-rw-r--r--pylint/test/functional/logging_format_interpolation.py (renamed from pylint/test/input/func_w1202.py)12
-rw-r--r--pylint/test/functional/logging_format_interpolation.txt4
-rw-r--r--pylint/test/functional/logging_not_lazy.py (renamed from pylint/test/input/func_w1201.py)12
-rw-r--r--pylint/test/functional/logging_not_lazy.txt3
-rw-r--r--pylint/test/functional/no_self_use.py (renamed from pylint/test/input/func_method_could_be_function.py)2
-rw-r--r--pylint/test/functional/no_self_use.txt1
-rw-r--r--pylint/test/functional/nonexistent_operator.py15
-rw-r--r--pylint/test/functional/nonexistent_operator.txt6
-rw-r--r--pylint/test/functional/too_few_public_methods.py (renamed from pylint/test/input/func_r0903.py)11
-rw-r--r--pylint/test/functional/too_few_public_methods.txt1
-rw-r--r--pylint/test/functional/too_many_ancestors.py25
-rw-r--r--pylint/test/functional/too_many_ancestors.txt2
-rw-r--r--pylint/test/functional/too_many_arguments.py4
-rw-r--r--pylint/test/functional/too_many_arguments.txt1
-rw-r--r--pylint/test/functional/too_many_instance_attributes.py (renamed from pylint/test/input/func_r0902.py)8
-rw-r--r--pylint/test/functional/too_many_instance_attributes.txt1
-rw-r--r--pylint/test/functional/too_many_public_methods.py (renamed from pylint/test/input/func_r0904.py)9
-rw-r--r--pylint/test/functional/too_many_public_methods.txt1
-rw-r--r--pylint/test/functional/too_many_return_statements.py (renamed from pylint/test/input/func_w0101.py)8
-rw-r--r--pylint/test/functional/too_many_return_statements.txt1
-rw-r--r--pylint/test/functional/too_many_statements.py (renamed from pylint/test/input/func_w0105.py)6
-rw-r--r--pylint/test/functional/too_many_statements.txt1
-rw-r--r--pylint/test/functional/trailing_whitespaces.py (renamed from pylint/test/input/func_trailing_whitespace.py)3
-rw-r--r--pylint/test/functional/trailing_whitespaces.txt3
-rw-r--r--pylint/test/functional/unreachable.py22
-rw-r--r--pylint/test/functional/unreachable.txt4
-rw-r--r--pylint/test/input/func_eval_used.py13
-rw-r--r--pylint/test/input/func_f0401.py9
-rw-r--r--pylint/test/input/func_operators.py19
-rw-r--r--pylint/test/input/func_r0901.py27
-rw-r--r--pylint/test/input/func_set_literal_as_default_py27.py7
-rw-r--r--pylint/test/input/func_unreachable.py21
-rw-r--r--pylint/test/input/func_w0103.py8
-rw-r--r--pylint/test/input/func_w0110.py10
-rw-r--r--pylint/test/input/func_w0111.py10
-rw-r--r--pylint/test/input/func_w0112.py37
-rw-r--r--pylint/test/input/func_w0151.py5
-rw-r--r--pylint/test/input/func_w0202.py17
-rw-r--r--pylint/test/messages/func_bad_exception_context_py30.txt3
-rw-r--r--pylint/test/messages/func_dangerous_default.txt13
-rw-r--r--pylint/test/messages/func_dangerous_default_py30.txt13
-rw-r--r--pylint/test/messages/func_eval_used.txt4
-rw-r--r--pylint/test/messages/func_f0401.txt2
-rw-r--r--pylint/test/messages/func_fixme.txt5
-rw-r--r--pylint/test/messages/func_invalid_sequence_index.txt19
-rw-r--r--pylint/test/messages/func_method_could_be_function.txt1
-rw-r--r--pylint/test/messages/func_operators.txt6
-rw-r--r--pylint/test/messages/func_r0901.txt2
-rw-r--r--pylint/test/messages/func_r0902.txt1
-rw-r--r--pylint/test/messages/func_r0903.txt1
-rw-r--r--pylint/test/messages/func_r0904.txt1
-rw-r--r--pylint/test/messages/func_r0923.txt1
-rw-r--r--pylint/test/messages/func_set_literal_as_default_py27.txt1
-rw-r--r--pylint/test/messages/func_trailing_whitespace.txt3
-rw-r--r--pylint/test/messages/func_unreachable.txt3
-rw-r--r--pylint/test/messages/func_w0101.txt1
-rw-r--r--pylint/test/messages/func_w0102.txt5
-rw-r--r--pylint/test/messages/func_w0103.txt1
-rw-r--r--pylint/test/messages/func_w0105.txt1
-rw-r--r--pylint/test/messages/func_w0110.txt1
-rw-r--r--pylint/test/messages/func_w0111.txt1
-rw-r--r--pylint/test/messages/func_w0112.txt1
-rw-r--r--pylint/test/messages/func_w0151.txt1
-rw-r--r--pylint/test/messages/func_w0202.txt3
-rw-r--r--pylint/test/messages/func_w1201.txt3
-rw-r--r--pylint/test/messages/func_w1202.txt4
93 files changed, 378 insertions, 375 deletions
diff --git a/pylint/test/functional/bad_builtin.py b/pylint/test/functional/bad_builtin.py
new file mode 100644
index 0000000..fd4eaf6
--- /dev/null
+++ b/pylint/test/functional/bad_builtin.py
@@ -0,0 +1,3 @@
+# pylint: disable=missing-docstring
+
+TEST = map(str, (1, 2, 3)) # [bad-builtin]
diff --git a/pylint/test/functional/bad_builtin.txt b/pylint/test/functional/bad_builtin.txt
new file mode 100644
index 0000000..8a3d610
--- /dev/null
+++ b/pylint/test/functional/bad_builtin.txt
@@ -0,0 +1 @@
+bad-builtin:3::Used builtin function 'map'
diff --git a/pylint/test/input/func_bad_exception_context_py30.py b/pylint/test/functional/bad_exception_context.py
index 98b44ee..f386343 100644
--- a/pylint/test/input/func_bad_exception_context_py30.py
+++ b/pylint/test/functional/bad_exception_context.py
@@ -11,14 +11,14 @@ class ExceptionSubclass(Exception):
def test():
""" docstring """
- raise IndexError from 1
+ raise IndexError from 1 # [bad-exception-context]
raise IndexError from None
raise IndexError from ZeroDivisionError
- raise IndexError from object()
+ raise IndexError from object() # [bad-exception-context]
raise IndexError from ExceptionSubclass
raise IndexError from socket.error
raise IndexError() from None
raise IndexError() from ZeroDivisionError
raise IndexError() from ZeroDivisionError()
- raise IndexError() from object()
+ raise IndexError() from object() # [bad-exception-context]
raise IndexError() from unknown
diff --git a/pylint/test/functional/bad_exception_context.rc b/pylint/test/functional/bad_exception_context.rc
new file mode 100644
index 0000000..8c6eb56
--- /dev/null
+++ b/pylint/test/functional/bad_exception_context.rc
@@ -0,0 +1,2 @@
+[testoptions]
+min_pyver=3.0 \ No newline at end of file
diff --git a/pylint/test/functional/bad_exception_context.txt b/pylint/test/functional/bad_exception_context.txt
new file mode 100644
index 0000000..f403a39
--- /dev/null
+++ b/pylint/test/functional/bad_exception_context.txt
@@ -0,0 +1,3 @@
+bad-exception-context:14:test:Exception context set to something which is not an exception, nor None
+bad-exception-context:17:test:Exception context set to something which is not an exception, nor None
+bad-exception-context:23:test:Exception context set to something which is not an exception, nor None \ No newline at end of file
diff --git a/pylint/test/functional/bad_staticmethod_argument.py b/pylint/test/functional/bad_staticmethod_argument.py
new file mode 100644
index 0000000..0ff5d9b
--- /dev/null
+++ b/pylint/test/functional/bad_staticmethod_argument.py
@@ -0,0 +1,16 @@
+# pylint: disable=missing-docstring
+
+class Abcd(object):
+
+ def method1(self): # [bad-staticmethod-argument]
+ pass
+
+ method1 = staticmethod(method1)
+
+ def method2(cls): # [bad-staticmethod-argument]
+ pass
+
+ method2 = staticmethod(method2)
+
+ def __init__(self):
+ pass
diff --git a/pylint/test/functional/bad_staticmethod_argument.txt b/pylint/test/functional/bad_staticmethod_argument.txt
new file mode 100644
index 0000000..a9d5b46
--- /dev/null
+++ b/pylint/test/functional/bad_staticmethod_argument.txt
@@ -0,0 +1,2 @@
+bad-staticmethod-argument:5:Abcd.method1:Static method with 'self' as first argument
+bad-staticmethod-argument:10:Abcd.method2:Static method with 'cls' as first argument \ No newline at end of file
diff --git a/pylint/test/functional/blacklisted_name.py b/pylint/test/functional/blacklisted_name.py
new file mode 100644
index 0000000..b62c6d2
--- /dev/null
+++ b/pylint/test/functional/blacklisted_name.py
@@ -0,0 +1,4 @@
+# pylint: disable=missing-docstring
+
+def baz(): # [blacklisted-name]
+ pass
diff --git a/pylint/test/functional/blacklisted_name.txt b/pylint/test/functional/blacklisted_name.txt
new file mode 100644
index 0000000..f0fc9c2
--- /dev/null
+++ b/pylint/test/functional/blacklisted_name.txt
@@ -0,0 +1 @@
+blacklisted-name:3:baz:Black listed name "baz"
diff --git a/pylint/test/input/func_dangerous_default.py b/pylint/test/functional/dangerous_default_value.py
index 7351c12..58a22f4 100644
--- a/pylint/test/input/func_dangerous_default.py
+++ b/pylint/test/functional/dangerous_default_value.py
@@ -1,14 +1,13 @@
-"""docstring"""
-
+# pylint: disable=missing-docstring
HEHE = {}
-def function1(value=[]):
+def function1(value=[]): # [dangerous-default-value]
"""docstring"""
return value
-def function2(value=HEHE):
+def function2(value=HEHE): # [dangerous-default-value]
"""docstring"""
return value
@@ -16,7 +15,7 @@ def function3(value):
"""docstring"""
return value
-def function4(value=set()):
+def function4(value=set()): # [dangerous-default-value]
"""set is mutable and dangerous."""
return value
@@ -26,31 +25,31 @@ def function5(value=frozenset()):
GLOBAL_SET = set()
-def function6(value=GLOBAL_SET):
+def function6(value=GLOBAL_SET): # [dangerous-default-value]
"""set is mutable and dangerous."""
return value
-def function7(value=dict()):
+def function7(value=dict()): # [dangerous-default-value]
"""dict is mutable and dangerous."""
return value
-def function8(value=list()):
+def function8(value=list()): # [dangerous-default-value]
"""list is mutable and dangerous."""
return value
-def function9(value=[1, 2, 3, 4]):
+def function9(value=[1, 2, 3, 4]): # [dangerous-default-value]
"""list with items should not output item values in error message"""
return value
-def function10(value={'a': 1, 'b': 2}):
+def function10(value={'a': 1, 'b': 2}): # [dangerous-default-value]
"""dictionaries with items should not output item values in error message"""
return value
-def function11(value=list([1, 2, 3])):
+def function11(value=list([1, 2, 3])): # [dangerous-default-value]
"""list with items should not output item values in error message"""
return value
-def function12(value=dict([('a', 1), ('b', 2)])):
+def function12(value=dict([('a', 1), ('b', 2)])): # [dangerous-default-value]
"""dictionaries with items should not output item values in error message"""
return value
@@ -59,11 +58,11 @@ OINK = {
'b': 2
}
-def function13(value=OINK):
+def function13(value=OINK): # [dangerous-default-value]
"""dictionaries with items should not output item values in error message"""
return value
-def function14(value=dict([(1, 2), (1, 2, 3)])):
+def function14(value=dict([(1, 2), (1, 2, 3)])): # [dangerous-default-value]
"""a dictionary which will not be inferred to a syntax AST, but to an
astroid.Instance.
"""
@@ -71,6 +70,10 @@ def function14(value=dict([(1, 2), (1, 2, 3)])):
INVALID_DICT = dict([(1, 2), (1, 2, 3)])
-def function15(value=INVALID_DICT):
+def function15(value=INVALID_DICT): # [dangerous-default-value]
"""The same situation as function14."""
return value
+
+def function16(value={1}): # [dangerous-default-value]
+ """set literal as default value"""
+ return value
diff --git a/pylint/test/functional/dangerous_default_value.rc b/pylint/test/functional/dangerous_default_value.rc
new file mode 100644
index 0000000..a2328ed
--- /dev/null
+++ b/pylint/test/functional/dangerous_default_value.rc
@@ -0,0 +1,2 @@
+[testoptions]
+max_pyver=3.0 \ No newline at end of file
diff --git a/pylint/test/functional/dangerous_default_value.txt b/pylint/test/functional/dangerous_default_value.txt
new file mode 100644
index 0000000..92180e9
--- /dev/null
+++ b/pylint/test/functional/dangerous_default_value.txt
@@ -0,0 +1,14 @@
+dangerous-default-value:6:function1:Dangerous default value [] as argument
+dangerous-default-value:10:function2:Dangerous default value HEHE (__builtin__.dict) as argument
+dangerous-default-value:18:function4:Dangerous default value set() (__builtin__.set) as argument
+dangerous-default-value:28:function6:Dangerous default value GLOBAL_SET (__builtin__.set) as argument
+dangerous-default-value:32:function7:Dangerous default value dict() (__builtin__.dict) as argument
+dangerous-default-value:36:function8:Dangerous default value list() (__builtin__.list) as argument
+dangerous-default-value:40:function9:Dangerous default value [] as argument
+dangerous-default-value:44:function10:Dangerous default value {} as argument
+dangerous-default-value:48:function11:Dangerous default value list() (__builtin__.list) as argument
+dangerous-default-value:52:function12:Dangerous default value dict() (__builtin__.dict) as argument
+dangerous-default-value:61:function13:Dangerous default value OINK (__builtin__.dict) as argument
+dangerous-default-value:65:function14:Dangerous default value dict() (__builtin__.dict) as argument
+dangerous-default-value:73:function15:Dangerous default value INVALID_DICT (__builtin__.dict) as argument
+dangerous-default-value:77:function16:Dangerous default value set() as argument
diff --git a/pylint/test/functional/dangerous_default_value_py30.py b/pylint/test/functional/dangerous_default_value_py30.py
new file mode 100644
index 0000000..58a22f4
--- /dev/null
+++ b/pylint/test/functional/dangerous_default_value_py30.py
@@ -0,0 +1,79 @@
+# pylint: disable=missing-docstring
+
+
+HEHE = {}
+
+def function1(value=[]): # [dangerous-default-value]
+ """docstring"""
+ return value
+
+def function2(value=HEHE): # [dangerous-default-value]
+ """docstring"""
+ return value
+
+def function3(value):
+ """docstring"""
+ return value
+
+def function4(value=set()): # [dangerous-default-value]
+ """set is mutable and dangerous."""
+ return value
+
+def function5(value=frozenset()):
+ """frozenset is immutable and safe."""
+ return value
+
+GLOBAL_SET = set()
+
+def function6(value=GLOBAL_SET): # [dangerous-default-value]
+ """set is mutable and dangerous."""
+ return value
+
+def function7(value=dict()): # [dangerous-default-value]
+ """dict is mutable and dangerous."""
+ return value
+
+def function8(value=list()): # [dangerous-default-value]
+ """list is mutable and dangerous."""
+ return value
+
+def function9(value=[1, 2, 3, 4]): # [dangerous-default-value]
+ """list with items should not output item values in error message"""
+ return value
+
+def function10(value={'a': 1, 'b': 2}): # [dangerous-default-value]
+ """dictionaries with items should not output item values in error message"""
+ return value
+
+def function11(value=list([1, 2, 3])): # [dangerous-default-value]
+ """list with items should not output item values in error message"""
+ return value
+
+def function12(value=dict([('a', 1), ('b', 2)])): # [dangerous-default-value]
+ """dictionaries with items should not output item values in error message"""
+ return value
+
+OINK = {
+ 'a': 1,
+ 'b': 2
+}
+
+def function13(value=OINK): # [dangerous-default-value]
+ """dictionaries with items should not output item values in error message"""
+ return value
+
+def function14(value=dict([(1, 2), (1, 2, 3)])): # [dangerous-default-value]
+ """a dictionary which will not be inferred to a syntax AST, but to an
+ astroid.Instance.
+ """
+ return value
+
+INVALID_DICT = dict([(1, 2), (1, 2, 3)])
+
+def function15(value=INVALID_DICT): # [dangerous-default-value]
+ """The same situation as function14."""
+ return value
+
+def function16(value={1}): # [dangerous-default-value]
+ """set literal as default value"""
+ return value
diff --git a/pylint/test/functional/dangerous_default_value_py30.rc b/pylint/test/functional/dangerous_default_value_py30.rc
new file mode 100644
index 0000000..8c6eb56
--- /dev/null
+++ b/pylint/test/functional/dangerous_default_value_py30.rc
@@ -0,0 +1,2 @@
+[testoptions]
+min_pyver=3.0 \ No newline at end of file
diff --git a/pylint/test/functional/dangerous_default_value_py30.txt b/pylint/test/functional/dangerous_default_value_py30.txt
new file mode 100644
index 0000000..7571c00
--- /dev/null
+++ b/pylint/test/functional/dangerous_default_value_py30.txt
@@ -0,0 +1,14 @@
+dangerous-default-value:6:function1:Dangerous default value [] as argument
+dangerous-default-value:10:function2:Dangerous default value HEHE (builtins.dict) as argument
+dangerous-default-value:18:function4:Dangerous default value set() (builtins.set) as argument
+dangerous-default-value:28:function6:Dangerous default value GLOBAL_SET (builtins.set) as argument
+dangerous-default-value:32:function7:Dangerous default value dict() (builtins.dict) as argument
+dangerous-default-value:36:function8:Dangerous default value list() (builtins.list) as argument
+dangerous-default-value:40:function9:Dangerous default value [] as argument
+dangerous-default-value:44:function10:Dangerous default value {} as argument
+dangerous-default-value:48:function11:Dangerous default value list() (builtins.list) as argument
+dangerous-default-value:52:function12:Dangerous default value dict() (builtins.dict) as argument
+dangerous-default-value:61:function13:Dangerous default value OINK (builtins.dict) as argument
+dangerous-default-value:65:function14:Dangerous default value dict() (builtins.dict) as argument
+dangerous-default-value:73:function15:Dangerous default value INVALID_DICT (builtins.dict) as argument
+dangerous-default-value:77:function16:Dangerous default value set() as argument \ No newline at end of file
diff --git a/pylint/test/functional/eval_used.py b/pylint/test/functional/eval_used.py
new file mode 100644
index 0000000..799121b
--- /dev/null
+++ b/pylint/test/functional/eval_used.py
@@ -0,0 +1,11 @@
+"""test for eval usage"""
+
+eval('os.listdir(".")') # [eval-used]
+eval('os.listdir(".")', globals={}) # [eval-used]
+
+eval('os.listdir(".")', globals=globals()) # [eval-used]
+
+def func():
+ """ eval in local scope"""
+ eval('b = 1') # [eval-used]
+
diff --git a/pylint/test/functional/eval_used.txt b/pylint/test/functional/eval_used.txt
new file mode 100644
index 0000000..7f0e041
--- /dev/null
+++ b/pylint/test/functional/eval_used.txt
@@ -0,0 +1,4 @@
+eval-used:3::Use of eval
+eval-used:4::Use of eval
+eval-used:6::Use of eval
+eval-used:10:func:Use of eval \ No newline at end of file
diff --git a/pylint/test/input/func_fixme.py b/pylint/test/functional/fixme.py
index 9210be6..9d5d966 100644
--- a/pylint/test/input/func_fixme.py
+++ b/pylint/test/functional/fixme.py
@@ -1,15 +1,18 @@
-"""docstring"""
-# pylint: disable=W0612
-__revision__ = ''
+# pylint: disable=missing-docstring, unused-variable
+
+# +1: [fixme]
# FIXME: beep
def function():
- '''XXX:bop'''
variable = "FIXME: Ignore me!"
+ # +1: [fixme]
test = "text" # FIXME: Valid test
+ # +1: [fixme]
# TODO: Do something with the variables
+ # +1: [fixme]
xxx = "n/a" # XXX: Fix this later
+ # +1: [fixme]
#FIXME: no space after hash
diff --git a/pylint/test/functional/fixme.txt b/pylint/test/functional/fixme.txt
new file mode 100644
index 0000000..581788a
--- /dev/null
+++ b/pylint/test/functional/fixme.txt
@@ -0,0 +1,5 @@
+fixme:5::"FIXME: beep"
+fixme:11::"FIXME: Valid test"
+fixme:14::"TODO: Do something with the variables"
+fixme:16::"XXX: Fix this later"
+fixme:18::"FIXME: no space after hash" \ No newline at end of file
diff --git a/pylint/test/input/func_w0102.py b/pylint/test/functional/function_redefined.py
index 8a8ae4d..412ff28 100644
--- a/pylint/test/input/func_w0102.py
+++ b/pylint/test/functional/function_redefined.py
@@ -12,10 +12,10 @@ class AAAA(object):
def method2(self):
"""docstring"""
- def method2(self):
+ def method2(self): # [function-redefined]
"""docstring"""
-class AAAA(object):
+class AAAA(object): # [function-redefined]
"""docstring"""
def __init__(self):
pass
@@ -29,9 +29,9 @@ def func1():
def func2():
"""docstring"""
-def func2():
+def func2(): # [function-redefined]
"""docstring"""
- __revision__ = 1
+ __revision__ = 1 # [redefined-outer-name]
return __revision__
if __revision__:
@@ -48,7 +48,7 @@ except TypeError:
def exclusive_func2():
"docstring"
else:
- def exclusive_func2():
+ def exclusive_func2(): # [function-redefined]
"this one redefine the one defined line 42"
diff --git a/pylint/test/functional/function_redefined.txt b/pylint/test/functional/function_redefined.txt
new file mode 100644
index 0000000..56fabc5
--- /dev/null
+++ b/pylint/test/functional/function_redefined.txt
@@ -0,0 +1,5 @@
+function-redefined:15:AAAA.method2:method already defined line 12
+function-redefined:18:AAAA:class already defined line 5
+function-redefined:32:func2:function already defined line 29
+redefined-outer-name:34:func2:Redefining name '__revision__' from outer scope (line 3)
+function-redefined:51:exclusive_func2:function already defined line 45
diff --git a/pylint/test/input/func_r0923.py b/pylint/test/functional/interface_not_implemented.py
index 8ab44a1..6244ac4 100644
--- a/pylint/test/input/func_r0923.py
+++ b/pylint/test/functional/interface_not_implemented.py
@@ -1,9 +1,9 @@
-"""test max methods"""
+# pylint: disable=missing-docstring
from __future__ import absolute_import
-__revision__ = None
+
from logilab.common.interface import Interface
-class IAaaa(Interface):
+class IAaaa(Interface): # [interface-not-implemented]
"""yo"""
def meth1(self):
diff --git a/pylint/test/functional/interface_not_implemented.txt b/pylint/test/functional/interface_not_implemented.txt
new file mode 100644
index 0000000..ded0625
--- /dev/null
+++ b/pylint/test/functional/interface_not_implemented.txt
@@ -0,0 +1 @@
+interface-not-implemented:6:IAaaa:Interface not implemented
diff --git a/pylint/test/functional/invalid_name.py b/pylint/test/functional/invalid_name.py
index e86cfb3..1b45748 100644
--- a/pylint/test/functional/invalid_name.py
+++ b/pylint/test/functional/invalid_name.py
@@ -26,3 +26,6 @@ def test():
except ImportError:
re = None
return re
+
+def a(): # [invalid-name]
+ """yo"""
diff --git a/pylint/test/functional/invalid_name.txt b/pylint/test/functional/invalid_name.txt
index 0c8eafe..b5e9b7e 100644
--- a/pylint/test/functional/invalid_name.txt
+++ b/pylint/test/functional/invalid_name.txt
@@ -1,2 +1,3 @@
invalid-name:10::"Invalid constant name ""aaa"""
invalid-name:14::"Invalid constant name ""time"""
+invalid-name:30:a:"Invalid function name ""a"""
diff --git a/pylint/test/input/func_invalid_sequence_index.py b/pylint/test/functional/invalid_sequence_index.py
index b60e0b5..232b727 100644
--- a/pylint/test/input/func_invalid_sequence_index.py
+++ b/pylint/test/functional/invalid_sequence_index.py
@@ -10,19 +10,19 @@ TESTSTR = '123'
# getitem tests with bad indices
def function1():
"""list index is a function"""
- return TESTLIST[id]
+ return TESTLIST[id] # [invalid-sequence-index]
def function2():
"""list index is None"""
- return TESTLIST[None]
+ return TESTLIST[None] # [invalid-sequence-index]
def function3():
"""list index is a float expression"""
- return TESTLIST[float(0)]
+ return TESTLIST[float(0)] # [invalid-sequence-index]
def function4():
"""list index is a str constant"""
- return TESTLIST['0']
+ return TESTLIST['0'] # [invalid-sequence-index]
def function5():
"""list index does not implement __index__"""
@@ -30,22 +30,22 @@ def function5():
"""Class without __index__ method"""
pass
- return TESTLIST[NonIndexType()]
+ return TESTLIST[NonIndexType()] # [invalid-sequence-index]
def function6():
"""Tuple index is None"""
- return TESTTUPLE[None]
+ return TESTTUPLE[None] # [invalid-sequence-index]
def function7():
"""String index is None"""
- return TESTSTR[None]
+ return TESTSTR[None] # [invalid-sequence-index]
def function8():
"""Index of subclass of tuple is None"""
class TupleTest(tuple):
"""Subclass of tuple"""
pass
- return TupleTest()[None]
+ return TupleTest()[None] # [invalid-sequence-index]
# getitem tests with good indices
def function9():
@@ -125,12 +125,12 @@ def function18():
# Test with set and delete statements
def function19():
"""Set with None and integer indices"""
- TESTLIST[None] = 0
+ TESTLIST[None] = 0 # [invalid-sequence-index]
TESTLIST[0] = 0 # no error
def function20():
"""Delete with None and integer indicies"""
- del TESTLIST[None]
+ del TESTLIST[None] # [invalid-sequence-index]
del TESTLIST[0] # no error
def function21():
@@ -141,8 +141,8 @@ def function21():
test = ListTest()
# Set and delete with invalid indices
- test[None] = 0
- del test[None]
+ test[None] = 0 # [invalid-sequence-index]
+ del test[None] # [invalid-sequence-index]
# Set and delete with valid indices
test[0] = 0 # no error
@@ -156,8 +156,10 @@ def function22():
pass
test = ListTest()
- test[None][0] = 0 # failure on the getitem with None
- del test[None]
+ # failure on the getitem with None
+ test[None][0] = 0 # [invalid-sequence-index]
+ # failure on the getitem with None
+ del test[None] # [invalid-sequence-index]
test[0][0] = 0 # getitem with int and setitem with int, no error
test[None] = 0 # setitem overridden, no error
@@ -172,8 +174,10 @@ def function23():
pass
test = ListTest()
- test[None][0] = 0 # failure on the getitem with None
- test[None] = 0 # setitem with invalid index
+ # failure on the getitem with None
+ test[None][0] = 0 # [invalid-sequence-index]
+ # setitem with invalid index
+ test[None] = 0 # [invalid-sequence-index]
test[0][0] = 0 # getitem with int and setitem with int, no error
test[0] = 0 # setitem with int, no error
@@ -188,8 +192,10 @@ def function24():
pass
test = ListTest()
- test[None] = 0 # setitem with invalid index
- del test[None] # delitem with invalid index
+ # setitem with invalid index
+ test[None] = 0 # [invalid-sequence-index]
+ # delitem with invalid index
+ del test[None] # [invalid-sequence-index]
test[None][0] = 0 # getitem overriden, no error
test[0][0] = 0 # getitem with int and setitem with int, no error
@@ -199,7 +205,7 @@ def function24():
# Teest ExtSlice usage
def function25():
"""Extended slice used with a list"""
- return TESTLIST[..., 0]
+ return TESTLIST[..., 0] # [invalid-sequence-index]
def function26():
"""Extended slice used with an object that implements __getitem__"""
diff --git a/pylint/test/functional/invalid_sequence_index.txt b/pylint/test/functional/invalid_sequence_index.txt
new file mode 100644
index 0000000..204aebc
--- /dev/null
+++ b/pylint/test/functional/invalid_sequence_index.txt
@@ -0,0 +1,20 @@
+invalid-sequence-index:13:function1:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:17:function2:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:21:function3:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:25:function4:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:33:function5:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:37:function6:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:41:function7:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:48:function8:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:128:function19:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:133:function20:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:144:function21:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:145:function21:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:159:function22:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:160:function22:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:162:function22:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:178:function23:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:180:function23:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:196:function24:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:198:function24:Sequence index is not an int, slice, or instance with __index__
+invalid-sequence-index:208:function25:Sequence index is not an int, slice, or instance with __index__ \ No newline at end of file
diff --git a/pylint/test/input/func_w1202.py b/pylint/test/functional/logging_format_interpolation.py
index 7efb825..85117bf 100644
--- a/pylint/test/input/func_w1202.py
+++ b/pylint/test/functional/logging_format_interpolation.py
@@ -1,6 +1,4 @@
-# pylint: disable=E1101, no-absolute-import, import-error
-"""test checking use of the logging module
-"""
+# pylint: disable=E1101, no-absolute-import, import-error,line-too-long, missing-docstring
try:
import __builtin__ as builtins
@@ -14,10 +12,10 @@ import os as logging
FORMAT_STR = '{0}, {1}'
# Statements that should be flagged:
-renamed_logging.debug('{0}, {1}'.format(4, 5))
-renamed_logging.log(renamed_logging.DEBUG, 'msg: {}'.format('Run!'))
-renamed_logging.debug(FORMAT_STR.format(4, 5))
-renamed_logging.log(renamed_logging.DEBUG, FORMAT_STR.format(4, 5))
+renamed_logging.debug('{0}, {1}'.format(4, 5)) # [logging-format-interpolation]
+renamed_logging.log(renamed_logging.DEBUG, 'msg: {}'.format('Run!')) # [logging-format-interpolation]
+renamed_logging.debug(FORMAT_STR.format(4, 5)) # [logging-format-interpolation]
+renamed_logging.log(renamed_logging.DEBUG, FORMAT_STR.format(4, 5)) # [logging-format-interpolation]
# Statements that should not be flagged:
renamed_logging.debug(format(66, 'x'))
diff --git a/pylint/test/functional/logging_format_interpolation.txt b/pylint/test/functional/logging_format_interpolation.txt
new file mode 100644
index 0000000..d08878e
--- /dev/null
+++ b/pylint/test/functional/logging_format_interpolation.txt
@@ -0,0 +1,4 @@
+logging-format-interpolation:15::Use % formatting in logging functions but pass the % parameters as arguments
+logging-format-interpolation:16::Use % formatting in logging functions but pass the % parameters as arguments
+logging-format-interpolation:17::Use % formatting in logging functions but pass the % parameters as arguments
+logging-format-interpolation:18::Use % formatting in logging functions but pass the % parameters as arguments
diff --git a/pylint/test/input/func_w1201.py b/pylint/test/functional/logging_not_lazy.py
index a9791d9..ccc8665 100644
--- a/pylint/test/input/func_w1201.py
+++ b/pylint/test/functional/logging_not_lazy.py
@@ -1,17 +1,13 @@
-# pylint: disable=E1101, no-absolute-import
-"""test checking use of the logging module
-"""
-
-__revision__ = ''
+# pylint: disable=missing-docstring,no-member
# Muck up the names in an effort to confuse...
import logging as renamed_logging
import os as logging
# Statements that should be flagged:
-renamed_logging.warn('%s, %s' % (4, 5))
-renamed_logging.exception('%s' % 'Exceptional!')
-renamed_logging.log(renamed_logging.INFO, 'msg: %s' % 'Run!')
+renamed_logging.warn('%s, %s' % (4, 5)) # [logging-not-lazy]
+renamed_logging.exception('%s' % 'Exceptional!') # [logging-not-lazy]
+renamed_logging.log(renamed_logging.INFO, 'msg: %s' % 'Run!') # [logging-not-lazy]
# Statements that should not be flagged:
renamed_logging.warn('%s, %s', 4, 5)
diff --git a/pylint/test/functional/logging_not_lazy.txt b/pylint/test/functional/logging_not_lazy.txt
new file mode 100644
index 0000000..60c6c59
--- /dev/null
+++ b/pylint/test/functional/logging_not_lazy.txt
@@ -0,0 +1,3 @@
+logging-not-lazy:8::Specify string format arguments as logging function parameters
+logging-not-lazy:9::Specify string format arguments as logging function parameters
+logging-not-lazy:10::Specify string format arguments as logging function parameters
diff --git a/pylint/test/input/func_method_could_be_function.py b/pylint/test/functional/no_self_use.py
index 4a4ea8f..9c432f9 100644
--- a/pylint/test/input/func_method_could_be_function.py
+++ b/pylint/test/functional/no_self_use.py
@@ -13,7 +13,7 @@ class Toto(object):
"""this method is a real method since it access to self"""
self.function_method()
- def function_method(self):
+ def function_method(self): # [no-self-use]
"""this method isn' a real method since it doesn't need self"""
print('hello')
diff --git a/pylint/test/functional/no_self_use.txt b/pylint/test/functional/no_self_use.txt
new file mode 100644
index 0000000..e68dcff
--- /dev/null
+++ b/pylint/test/functional/no_self_use.txt
@@ -0,0 +1 @@
+no-self-use:16:Toto.function_method:Method could be a function \ No newline at end of file
diff --git a/pylint/test/functional/nonexistent_operator.py b/pylint/test/functional/nonexistent_operator.py
new file mode 100644
index 0000000..f05a649
--- /dev/null
+++ b/pylint/test/functional/nonexistent_operator.py
@@ -0,0 +1,15 @@
+"""check operator use"""
+# pylint: disable=invalid-name, pointless-statement
+a = 1
+a += 5
+a = +a
+b = ++a # [nonexistent-operator]
+++a # [nonexistent-operator]
+c = (++a) * b # [nonexistent-operator]
+
+a = 1
+a -= 5
+b = --a # [nonexistent-operator]
+b = a
+--a # [nonexistent-operator]
+c = (--a) * b # [nonexistent-operator]
diff --git a/pylint/test/functional/nonexistent_operator.txt b/pylint/test/functional/nonexistent_operator.txt
new file mode 100644
index 0000000..da59f41
--- /dev/null
+++ b/pylint/test/functional/nonexistent_operator.txt
@@ -0,0 +1,6 @@
+nonexistent-operator:6::"Use of the non-existent ++ operator"
+nonexistent-operator:7::"Use of the non-existent ++ operator"
+nonexistent-operator:8::"Use of the non-existent ++ operator"
+nonexistent-operator:12::"Use of the non-existent -- operator"
+nonexistent-operator:14::"Use of the non-existent -- operator"
+nonexistent-operator:15::"Use of the non-existent -- operator"
diff --git a/pylint/test/input/func_r0903.py b/pylint/test/functional/too_few_public_methods.py
index 49008f9..9b3c4b2 100644
--- a/pylint/test/input/func_r0903.py
+++ b/pylint/test/functional/too_few_public_methods.py
@@ -1,16 +1,15 @@
-"""test min methods"""
+# pylint: disable=missing-docstring
from __future__ import print_function
-__revision__ = None
-class Aaaa(object):
- """yo"""
+class Aaaa(object): # [too-few-public-methods]
+
def __init__(self):
pass
+
def meth1(self):
- """hehehe"""
print(self)
+
def _dontcount(self):
- """not public"""
print(self)
diff --git a/pylint/test/functional/too_few_public_methods.txt b/pylint/test/functional/too_few_public_methods.txt
new file mode 100644
index 0000000..be0e73e
--- /dev/null
+++ b/pylint/test/functional/too_few_public_methods.txt
@@ -0,0 +1 @@
+too-few-public-methods:4:Aaaa:Too few public methods (1/2)
diff --git a/pylint/test/functional/too_many_ancestors.py b/pylint/test/functional/too_many_ancestors.py
new file mode 100644
index 0000000..e0f7be2
--- /dev/null
+++ b/pylint/test/functional/too_many_ancestors.py
@@ -0,0 +1,25 @@
+# pylint: disable=missing-docstring, too-few-public-methods
+
+class Aaaa(object):
+ pass
+class Bbbb(object):
+ pass
+class Cccc(object):
+ pass
+class Dddd(object):
+ pass
+class Eeee(object):
+ pass
+class Ffff(object):
+ pass
+class Gggg(object):
+ pass
+class Hhhh(object):
+ pass
+
+class Iiii(Aaaa, Bbbb, Cccc, Dddd, Eeee, Ffff, Gggg, Hhhh): # [too-many-ancestors]
+ pass
+
+class Jjjj(Iiii): # [too-many-ancestors]
+ pass
+
diff --git a/pylint/test/functional/too_many_ancestors.txt b/pylint/test/functional/too_many_ancestors.txt
new file mode 100644
index 0000000..e9f0841
--- /dev/null
+++ b/pylint/test/functional/too_many_ancestors.txt
@@ -0,0 +1,2 @@
+too-many-ancestors:20:Iiii:Too many ancestors (9/7)
+too-many-ancestors:23:Jjjj:Too many ancestors (10/7) \ No newline at end of file
diff --git a/pylint/test/functional/too_many_arguments.py b/pylint/test/functional/too_many_arguments.py
new file mode 100644
index 0000000..99f4e78
--- /dev/null
+++ b/pylint/test/functional/too_many_arguments.py
@@ -0,0 +1,4 @@
+# pylint: disable=missing-docstring
+
+def stupid_function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9): # [too-many-arguments]
+ return arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9
diff --git a/pylint/test/functional/too_many_arguments.txt b/pylint/test/functional/too_many_arguments.txt
new file mode 100644
index 0000000..8f99a46
--- /dev/null
+++ b/pylint/test/functional/too_many_arguments.txt
@@ -0,0 +1 @@
+too-many-arguments:3:stupid_function:Too many arguments (9/5)
diff --git a/pylint/test/input/func_r0902.py b/pylint/test/functional/too_many_instance_attributes.py
index d0a7483..b77efdb 100644
--- a/pylint/test/input/func_r0902.py
+++ b/pylint/test/functional/too_many_instance_attributes.py
@@ -1,9 +1,7 @@
-# pylint: disable=R0903
-"""test max instance attributes"""
-__revision__ = None
+# pylint: disable=missing-docstring, too-few-public-methods
+
+class Aaaa(object): # [too-many-instance-attributes]
-class Aaaa(object):
- """yo"""
def __init__(self):
self.aaaa = 1
self.bbbb = 2
diff --git a/pylint/test/functional/too_many_instance_attributes.txt b/pylint/test/functional/too_many_instance_attributes.txt
new file mode 100644
index 0000000..652ccea
--- /dev/null
+++ b/pylint/test/functional/too_many_instance_attributes.txt
@@ -0,0 +1 @@
+too-many-instance-attributes:3:Aaaa:Too many instance attributes (21/7)
diff --git a/pylint/test/input/func_r0904.py b/pylint/test/functional/too_many_public_methods.py
index 85daf61..df6134f 100644
--- a/pylint/test/input/func_r0904.py
+++ b/pylint/test/functional/too_many_public_methods.py
@@ -1,8 +1,7 @@
-# pylint: disable=R0201
-"""test max methods"""
-__revision__ = None
-class Aaaa(object):
- """yo"""
+# pylint: disable=missing-docstring
+
+class Aaaa(object): # [too-many-public-methods]
+
def __init__(self):
pass
diff --git a/pylint/test/functional/too_many_public_methods.txt b/pylint/test/functional/too_many_public_methods.txt
new file mode 100644
index 0000000..1b5a250
--- /dev/null
+++ b/pylint/test/functional/too_many_public_methods.txt
@@ -0,0 +1 @@
+too-many-public-methods:3:Aaaa:Too many public methods (21/20)
diff --git a/pylint/test/input/func_w0101.py b/pylint/test/functional/too_many_return_statements.py
index fe543aa..7ae61a9 100644
--- a/pylint/test/input/func_w0101.py
+++ b/pylint/test/functional/too_many_return_statements.py
@@ -1,10 +1,6 @@
-"""test max returns
-"""
+# pylint: disable=missing-docstring
-__revision__ = ''
-
-def stupid_function(arg):
- """reallly stupid function"""
+def stupid_function(arg): # [too-many-return-statements]
if arg == 1:
return 1
elif arg == 2:
diff --git a/pylint/test/functional/too_many_return_statements.txt b/pylint/test/functional/too_many_return_statements.txt
new file mode 100644
index 0000000..4f65db2
--- /dev/null
+++ b/pylint/test/functional/too_many_return_statements.txt
@@ -0,0 +1 @@
+too-many-return-statements:3:stupid_function:Too many return statements (11/6) \ No newline at end of file
diff --git a/pylint/test/input/func_w0105.py b/pylint/test/functional/too_many_statements.py
index d5f8b9b..305db80 100644
--- a/pylint/test/input/func_w0105.py
+++ b/pylint/test/functional/too_many_statements.py
@@ -1,10 +1,8 @@
-"""test max branch
-"""
+# pylint: disable=missing-docstring
from __future__ import print_function
-def stupid_function(arg):
- """reallly stupid function"""
+def stupid_function(arg): # [too-many-statements]
if arg == 1:
print(1)
elif arg == 2:
diff --git a/pylint/test/functional/too_many_statements.txt b/pylint/test/functional/too_many_statements.txt
new file mode 100644
index 0000000..255e97e
--- /dev/null
+++ b/pylint/test/functional/too_many_statements.txt
@@ -0,0 +1 @@
+too-many-statements:5:stupid_function:Too many statements (55/50)
diff --git a/pylint/test/input/func_trailing_whitespace.py b/pylint/test/functional/trailing_whitespaces.py
index 283e3fd..48de809 100644
--- a/pylint/test/input/func_trailing_whitespace.py
+++ b/pylint/test/functional/trailing_whitespaces.py
@@ -2,7 +2,10 @@
# pylint: disable=mixed-line-endings
from __future__ import print_function
+# +1: [trailing-whitespace]
print('some trailing whitespace')
+# +1: [trailing-whitespace]
print('trailing whitespace does not count towards the line length limit')
print('windows line ends are ok')
+# +1: [trailing-whitespace]
print('but trailing whitespace on win is not')
diff --git a/pylint/test/functional/trailing_whitespaces.txt b/pylint/test/functional/trailing_whitespaces.txt
new file mode 100644
index 0000000..38fc2c3
--- /dev/null
+++ b/pylint/test/functional/trailing_whitespaces.txt
@@ -0,0 +1,3 @@
+trailing-whitespace:6::Trailing whitespace
+trailing-whitespace:8::Trailing whitespace
+trailing-whitespace:11::Trailing whitespace
diff --git a/pylint/test/functional/unreachable.py b/pylint/test/functional/unreachable.py
new file mode 100644
index 0000000..b03dec8
--- /dev/null
+++ b/pylint/test/functional/unreachable.py
@@ -0,0 +1,22 @@
+# pylint: disable=missing-docstring
+
+from __future__ import print_function
+
+def func1():
+ return 1
+ print('unreachable') # [unreachable]
+
+def func2():
+ while 1:
+ break
+ print('unreachable') # [unreachable]
+
+def func3():
+ for i in (1, 2, 3):
+ print(i)
+ continue
+ print('unreachable') # [unreachable]
+
+def func4():
+ raise Exception
+ return 1 / 0 # [unreachable]
diff --git a/pylint/test/functional/unreachable.txt b/pylint/test/functional/unreachable.txt
new file mode 100644
index 0000000..adf0526
--- /dev/null
+++ b/pylint/test/functional/unreachable.txt
@@ -0,0 +1,4 @@
+unreachable:7:func1:Unreachable code
+unreachable:12:func2:Unreachable code
+unreachable:18:func3:Unreachable code
+unreachable:22:func4:Unreachable code \ No newline at end of file
diff --git a/pylint/test/input/func_eval_used.py b/pylint/test/input/func_eval_used.py
deleted file mode 100644
index c58b69c..0000000
--- a/pylint/test/input/func_eval_used.py
+++ /dev/null
@@ -1,13 +0,0 @@
-"""test for eval usage"""
-
-__revision__ = 0
-
-eval('os.listdir(".")')
-eval('os.listdir(".")', globals={})
-
-eval('os.listdir(".")', globals=globals())
-
-def func():
- """ eval in local scope"""
- eval('b = 1')
-
diff --git a/pylint/test/input/func_f0401.py b/pylint/test/input/func_f0401.py
deleted file mode 100644
index 66e1240..0000000
--- a/pylint/test/input/func_f0401.py
+++ /dev/null
@@ -1,9 +0,0 @@
-"""test failed import
-"""
-from __future__ import absolute_import, print_function
-__revision__ = 0
-
-def function():
- """yo"""
- from tutu import toto
- print(toto)
diff --git a/pylint/test/input/func_operators.py b/pylint/test/input/func_operators.py
deleted file mode 100644
index 48606bf..0000000
--- a/pylint/test/input/func_operators.py
+++ /dev/null
@@ -1,19 +0,0 @@
-"""check operator use"""
-#pylint: disable=C0103
-#pylint: disable=W0104
-
-__revision__ = 42
-
-a = 1
-a += 5
-a = +a
-b = ++a
-++a
-c = (++a) * b
-
-a = 1
-a -= 5
-b = --a
-b = a
---a
-c = (--a) * b
diff --git a/pylint/test/input/func_r0901.py b/pylint/test/input/func_r0901.py
deleted file mode 100644
index ac69fb6..0000000
--- a/pylint/test/input/func_r0901.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# pylint: disable=W0232, R0903
-"""test max parents"""
-__revision__ = None
-
-class Aaaa(object):
- """yo"""
-class Bbbb(object):
- """yo"""
-class Cccc(object):
- """yo"""
-class Dddd(object):
- """yo"""
-class Eeee(object):
- """yo"""
-class Ffff(object):
- """yo"""
-class Gggg(object):
- """yo"""
-class Hhhh(object):
- """yo"""
-
-class Iiii(Aaaa, Bbbb, Cccc, Dddd, Eeee, Ffff, Gggg, Hhhh):
- """yo"""
-
-class Jjjj(Iiii):
- """yo"""
-
diff --git a/pylint/test/input/func_set_literal_as_default_py27.py b/pylint/test/input/func_set_literal_as_default_py27.py
deleted file mode 100644
index 1bd3f7e..0000000
--- a/pylint/test/input/func_set_literal_as_default_py27.py
+++ /dev/null
@@ -1,7 +0,0 @@
-"""docstring"""
-from __future__ import print_function
-__revision__ = ''
-
-def function1(value={1}):
- """set is mutable and dangerous."""
- print(value)
diff --git a/pylint/test/input/func_unreachable.py b/pylint/test/input/func_unreachable.py
deleted file mode 100644
index 4034e4f..0000000
--- a/pylint/test/input/func_unreachable.py
+++ /dev/null
@@ -1,21 +0,0 @@
-"""docstring"""
-from __future__ import print_function
-__revision__ = ''
-
-def func1():
- """docstring"""
- return 1
- print('unreachable')
-
-def func2():
- """docstring"""
- while 1:
- break
- print('unreachable')
-
-def func3():
- """docstring"""
- for i in (1, 2, 3):
- print(i)
- continue
- print('unreachable')
diff --git a/pylint/test/input/func_w0103.py b/pylint/test/input/func_w0103.py
deleted file mode 100644
index 04cb4c1..0000000
--- a/pylint/test/input/func_w0103.py
+++ /dev/null
@@ -1,8 +0,0 @@
-"""test max branch
-"""
-from __future__ import print_function
-__revision__ = ''
-
-def stupid_function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9):
- """reallly stupid function"""
- print(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
diff --git a/pylint/test/input/func_w0110.py b/pylint/test/input/func_w0110.py
deleted file mode 100644
index c9d9311..0000000
--- a/pylint/test/input/func_w0110.py
+++ /dev/null
@@ -1,10 +0,0 @@
-"""test too short name
-"""
-
-__revision__ = 1
-
-A = None
-
-def a():
- """yo"""
- pass
diff --git a/pylint/test/input/func_w0111.py b/pylint/test/input/func_w0111.py
deleted file mode 100644
index f8ad440..0000000
--- a/pylint/test/input/func_w0111.py
+++ /dev/null
@@ -1,10 +0,0 @@
-"""test black listed name
-"""
-
-__revision__ = 1
-
-A = None
-
-def baz():
- """yo"""
- pass
diff --git a/pylint/test/input/func_w0112.py b/pylint/test/input/func_w0112.py
deleted file mode 100644
index 00f952b..0000000
--- a/pylint/test/input/func_w0112.py
+++ /dev/null
@@ -1,37 +0,0 @@
-"""test max branch
-"""
-from __future__ import print_function
-
-
-def stupid_function(arg):
- """reallly stupid function"""
- if arg == 1:
- print(1)
- elif arg == 2:
- print(2)
- elif arg == 3:
- print(3)
- elif arg == 4:
- print(4)
- elif arg == 5:
- print(5)
- elif arg == 6:
- print(6)
- elif arg == 7:
- print(7)
- elif arg == 8:
- print(8)
- elif arg == 9:
- print(9)
- elif arg == 10:
- print(10)
- else:
- if arg < 1:
- print(0)
- else:
- print(100)
- arg = 0
- if arg:
- print(None)
- else:
- print(arg)
diff --git a/pylint/test/input/func_w0151.py b/pylint/test/input/func_w0151.py
deleted file mode 100644
index e6862c5..0000000
--- a/pylint/test/input/func_w0151.py
+++ /dev/null
@@ -1,5 +0,0 @@
-"""check black listed builtins
-"""
-
-__revision__ = map(str, (1, 2, 3))
-
diff --git a/pylint/test/input/func_w0202.py b/pylint/test/input/func_w0202.py
deleted file mode 100644
index 00b5b0f..0000000
--- a/pylint/test/input/func_w0202.py
+++ /dev/null
@@ -1,17 +0,0 @@
-"""check static method with self or cls as first argument"""
-
-__revision__ = None
-
-class Abcd(object):
- """dummy"""
-
- def method1(self):
- """hehe"""
- method1 = staticmethod(method1)
-
- def method2(cls):
- """hehe"""
- method2 = staticmethod(method2)
-
- def __init__(self):
- pass
diff --git a/pylint/test/messages/func_bad_exception_context_py30.txt b/pylint/test/messages/func_bad_exception_context_py30.txt
deleted file mode 100644
index 241195d..0000000
--- a/pylint/test/messages/func_bad_exception_context_py30.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-E: 14:test: Exception context set to something which is not an exception, nor None
-E: 17:test: Exception context set to something which is not an exception, nor None
-E: 23:test: Exception context set to something which is not an exception, nor None \ No newline at end of file
diff --git a/pylint/test/messages/func_dangerous_default.txt b/pylint/test/messages/func_dangerous_default.txt
deleted file mode 100644
index 8980b7c..0000000
--- a/pylint/test/messages/func_dangerous_default.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-W: 7:function1: Dangerous default value [] as argument
-W: 11:function2: Dangerous default value HEHE (__builtin__.dict) as argument
-W: 19:function4: Dangerous default value set() (__builtin__.set) as argument
-W: 29:function6: Dangerous default value GLOBAL_SET (__builtin__.set) as argument
-W: 33:function7: Dangerous default value dict() (__builtin__.dict) as argument
-W: 37:function8: Dangerous default value list() (__builtin__.list) as argument
-W: 41:function9: Dangerous default value [] as argument
-W: 45:function10: Dangerous default value {} as argument
-W: 49:function11: Dangerous default value list() (__builtin__.list) as argument
-W: 53:function12: Dangerous default value dict() (__builtin__.dict) as argument
-W: 62:function13: Dangerous default value OINK (__builtin__.dict) as argument
-W: 66:function14: Dangerous default value dict() (__builtin__.dict) as argument
-W: 74:function15: Dangerous default value INVALID_DICT (__builtin__.dict) as argument
diff --git a/pylint/test/messages/func_dangerous_default_py30.txt b/pylint/test/messages/func_dangerous_default_py30.txt
deleted file mode 100644
index eb05c87..0000000
--- a/pylint/test/messages/func_dangerous_default_py30.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-W: 7:function1: Dangerous default value [] as argument
-W: 11:function2: Dangerous default value HEHE (builtins.dict) as argument
-W: 19:function4: Dangerous default value set() (builtins.set) as argument
-W: 29:function6: Dangerous default value GLOBAL_SET (builtins.set) as argument
-W: 33:function7: Dangerous default value dict() (builtins.dict) as argument
-W: 37:function8: Dangerous default value list() (builtins.list) as argument
-W: 41:function9: Dangerous default value [] as argument
-W: 45:function10: Dangerous default value {} as argument
-W: 49:function11: Dangerous default value list() (builtins.list) as argument
-W: 53:function12: Dangerous default value dict() (builtins.dict) as argument
-W: 62:function13: Dangerous default value OINK (builtins.dict) as argument
-W: 66:function14: Dangerous default value dict() (builtins.dict) as argument
-W: 74:function15: Dangerous default value INVALID_DICT (builtins.dict) as argument
diff --git a/pylint/test/messages/func_eval_used.txt b/pylint/test/messages/func_eval_used.txt
deleted file mode 100644
index ab65307..0000000
--- a/pylint/test/messages/func_eval_used.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-W: 5: Use of eval
-W: 6: Use of eval
-W: 8: Use of eval
-W: 12:func: Use of eval \ No newline at end of file
diff --git a/pylint/test/messages/func_f0401.txt b/pylint/test/messages/func_f0401.txt
deleted file mode 100644
index 27dc386..0000000
--- a/pylint/test/messages/func_f0401.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-F: 8:function: Unable to import 'tutu'
-
diff --git a/pylint/test/messages/func_fixme.txt b/pylint/test/messages/func_fixme.txt
deleted file mode 100644
index deade52..0000000
--- a/pylint/test/messages/func_fixme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-W: 5: FIXME: beep
-W: 11: FIXME: Valid test
-W: 13: TODO: Do something with the variables
-W: 14: XXX: Fix this later
-W: 15: FIXME: no space after hash \ No newline at end of file
diff --git a/pylint/test/messages/func_invalid_sequence_index.txt b/pylint/test/messages/func_invalid_sequence_index.txt
deleted file mode 100644
index db9edab..0000000
--- a/pylint/test/messages/func_invalid_sequence_index.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-E: 13:function1: Sequence index is not an int, slice, or instance with __index__
-E: 17:function2: Sequence index is not an int, slice, or instance with __index__
-E: 21:function3: Sequence index is not an int, slice, or instance with __index__
-E: 25:function4: Sequence index is not an int, slice, or instance with __index__
-E: 33:function5: Sequence index is not an int, slice, or instance with __index__
-E: 37:function6: Sequence index is not an int, slice, or instance with __index__
-E: 41:function7: Sequence index is not an int, slice, or instance with __index__
-E: 48:function8: Sequence index is not an int, slice, or instance with __index__
-E:128:function19: Sequence index is not an int, slice, or instance with __index__
-E:133:function20: Sequence index is not an int, slice, or instance with __index__
-E:144:function21: Sequence index is not an int, slice, or instance with __index__
-E:145:function21: Sequence index is not an int, slice, or instance with __index__
-E:159:function22: Sequence index is not an int, slice, or instance with __index__
-E:160:function22: Sequence index is not an int, slice, or instance with __index__
-E:175:function23: Sequence index is not an int, slice, or instance with __index__
-E:176:function23: Sequence index is not an int, slice, or instance with __index__
-E:191:function24: Sequence index is not an int, slice, or instance with __index__
-E:192:function24: Sequence index is not an int, slice, or instance with __index__
-E:202:function25: Sequence index is not an int, slice, or instance with __index__
diff --git a/pylint/test/messages/func_method_could_be_function.txt b/pylint/test/messages/func_method_could_be_function.txt
deleted file mode 100644
index 1def89e..0000000
--- a/pylint/test/messages/func_method_could_be_function.txt
+++ /dev/null
@@ -1 +0,0 @@
-R: 16:Toto.function_method: Method could be a function
diff --git a/pylint/test/messages/func_operators.txt b/pylint/test/messages/func_operators.txt
deleted file mode 100644
index ba23690..0000000
--- a/pylint/test/messages/func_operators.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-E: 10: Use of the non-existent ++ operator
-E: 11: Use of the non-existent ++ operator
-E: 12: Use of the non-existent ++ operator
-E: 16: Use of the non-existent -- operator
-E: 18: Use of the non-existent -- operator
-E: 19: Use of the non-existent -- operator
diff --git a/pylint/test/messages/func_r0901.txt b/pylint/test/messages/func_r0901.txt
deleted file mode 100644
index 1f4007f..0000000
--- a/pylint/test/messages/func_r0901.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-R: 22:Iiii: Too many ancestors (9/7)
-R: 25:Jjjj: Too many ancestors (10/7)
diff --git a/pylint/test/messages/func_r0902.txt b/pylint/test/messages/func_r0902.txt
deleted file mode 100644
index 5dcb669..0000000
--- a/pylint/test/messages/func_r0902.txt
+++ /dev/null
@@ -1 +0,0 @@
-R: 5:Aaaa: Too many instance attributes (21/7)
diff --git a/pylint/test/messages/func_r0903.txt b/pylint/test/messages/func_r0903.txt
deleted file mode 100644
index 3ca8004..0000000
--- a/pylint/test/messages/func_r0903.txt
+++ /dev/null
@@ -1 +0,0 @@
-R: 5:Aaaa: Too few public methods (1/2)
diff --git a/pylint/test/messages/func_r0904.txt b/pylint/test/messages/func_r0904.txt
deleted file mode 100644
index 76baf72..0000000
--- a/pylint/test/messages/func_r0904.txt
+++ /dev/null
@@ -1 +0,0 @@
-R: 4:Aaaa: Too many public methods (21/20)
diff --git a/pylint/test/messages/func_r0923.txt b/pylint/test/messages/func_r0923.txt
deleted file mode 100644
index 11ee61d..0000000
--- a/pylint/test/messages/func_r0923.txt
+++ /dev/null
@@ -1 +0,0 @@
-R: 6:IAaaa: Interface not implemented
diff --git a/pylint/test/messages/func_set_literal_as_default_py27.txt b/pylint/test/messages/func_set_literal_as_default_py27.txt
deleted file mode 100644
index ba38ec4..0000000
--- a/pylint/test/messages/func_set_literal_as_default_py27.txt
+++ /dev/null
@@ -1 +0,0 @@
-W: 5:function1: Dangerous default value set() as argument
diff --git a/pylint/test/messages/func_trailing_whitespace.txt b/pylint/test/messages/func_trailing_whitespace.txt
deleted file mode 100644
index bfac360..0000000
--- a/pylint/test/messages/func_trailing_whitespace.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-C: 5: Trailing whitespace
-C: 6: Trailing whitespace
-C: 8: Trailing whitespace
diff --git a/pylint/test/messages/func_unreachable.txt b/pylint/test/messages/func_unreachable.txt
deleted file mode 100644
index bb25be0..0000000
--- a/pylint/test/messages/func_unreachable.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-W: 8:func1: Unreachable code
-W: 14:func2: Unreachable code
-W: 21:func3: Unreachable code
diff --git a/pylint/test/messages/func_w0101.txt b/pylint/test/messages/func_w0101.txt
deleted file mode 100644
index c42ec2c..0000000
--- a/pylint/test/messages/func_w0101.txt
+++ /dev/null
@@ -1 +0,0 @@
-R: 6:stupid_function: Too many return statements (11/6)
diff --git a/pylint/test/messages/func_w0102.txt b/pylint/test/messages/func_w0102.txt
deleted file mode 100644
index 40b6190..0000000
--- a/pylint/test/messages/func_w0102.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-E: 15:AAAA.method2: method already defined line 12
-E: 18:AAAA: class already defined line 5
-E: 32:func2: function already defined line 29
-E: 51:exclusive_func2: function already defined line 45
-W: 34:func2: Redefining name '__revision__' from outer scope (line 3)
diff --git a/pylint/test/messages/func_w0103.txt b/pylint/test/messages/func_w0103.txt
deleted file mode 100644
index 0d6da42..0000000
--- a/pylint/test/messages/func_w0103.txt
+++ /dev/null
@@ -1 +0,0 @@
-R: 6:stupid_function: Too many arguments (9/5)
diff --git a/pylint/test/messages/func_w0105.txt b/pylint/test/messages/func_w0105.txt
deleted file mode 100644
index d664dd4..0000000
--- a/pylint/test/messages/func_w0105.txt
+++ /dev/null
@@ -1 +0,0 @@
-R: 6:stupid_function: Too many statements (55/50)
diff --git a/pylint/test/messages/func_w0110.txt b/pylint/test/messages/func_w0110.txt
deleted file mode 100644
index b61400e..0000000
--- a/pylint/test/messages/func_w0110.txt
+++ /dev/null
@@ -1 +0,0 @@
-C: 8:a: Invalid function name "a"
diff --git a/pylint/test/messages/func_w0111.txt b/pylint/test/messages/func_w0111.txt
deleted file mode 100644
index b2d794b..0000000
--- a/pylint/test/messages/func_w0111.txt
+++ /dev/null
@@ -1 +0,0 @@
-C: 8:baz: Black listed name "baz"
diff --git a/pylint/test/messages/func_w0112.txt b/pylint/test/messages/func_w0112.txt
deleted file mode 100644
index 19b2da5..0000000
--- a/pylint/test/messages/func_w0112.txt
+++ /dev/null
@@ -1 +0,0 @@
-R: 6:stupid_function: Too many branches (15/12)
diff --git a/pylint/test/messages/func_w0151.txt b/pylint/test/messages/func_w0151.txt
deleted file mode 100644
index 9a53967..0000000
--- a/pylint/test/messages/func_w0151.txt
+++ /dev/null
@@ -1 +0,0 @@
-W: 4: Used builtin function 'map'
diff --git a/pylint/test/messages/func_w0202.txt b/pylint/test/messages/func_w0202.txt
deleted file mode 100644
index d10e5bc..0000000
--- a/pylint/test/messages/func_w0202.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-W: 8:Abcd.method1: Static method with 'self' as first argument
-W: 12:Abcd.method2: Static method with 'cls' as first argument
-
diff --git a/pylint/test/messages/func_w1201.txt b/pylint/test/messages/func_w1201.txt
deleted file mode 100644
index 45a742e..0000000
--- a/pylint/test/messages/func_w1201.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-W: 12: Specify string format arguments as logging function parameters
-W: 13: Specify string format arguments as logging function parameters
-W: 14: Specify string format arguments as logging function parameters
diff --git a/pylint/test/messages/func_w1202.txt b/pylint/test/messages/func_w1202.txt
deleted file mode 100644
index eb65fbe..0000000
--- a/pylint/test/messages/func_w1202.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-W: 17: Use % formatting in logging functions but pass the % parameters as arguments
-W: 18: Use % formatting in logging functions but pass the % parameters as arguments
-W: 19: Use % formatting in logging functions but pass the % parameters as arguments
-W: 20: Use % formatting in logging functions but pass the % parameters as arguments