Skip to content

Commit fcbe53b

Browse files
Add column to the information checked for functional tests
1 parent 0917b2a commit fcbe53b

File tree

293 files changed

+1541
-1540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

293 files changed

+1541
-1540
lines changed

pylint/testutils/output_line.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def __eq__(self, other):
2424

2525
class MalformedOutputLineException(Exception):
2626
def __init__(self, row, exception):
27-
example = "msg-symbolic-name:42:MyClass.my_function:The message"
28-
other_example = "msg-symbolic-name:7::The message"
27+
example = "msg-symbolic-name:42:27:MyClass.my_function:The message"
28+
other_example = "msg-symbolic-name:7:42::The message"
2929
reconstructed_row = ":".join(row)
3030
msg = "Expected '{example}' or '{other_example}' but we got '{reconstructed_row}'".format(
3131
example=example,
@@ -39,14 +39,15 @@ def __init__(self, row, exception):
3939

4040
class OutputLine(
4141
collections.namedtuple(
42-
"OutputLine", ["symbol", "lineno", "object", "msg", "confidence"]
42+
"OutputLine", ["symbol", "lineno", "column", "object", "msg", "confidence"]
4343
)
4444
):
4545
@classmethod
4646
def from_msg(cls, msg):
4747
return cls(
4848
msg.symbol,
4949
msg.line,
50+
str(msg.column),
5051
msg.obj or "",
5152
msg.msg.replace("\r\n", "\n"),
5253
msg.confidence.name
@@ -57,8 +58,8 @@ def from_msg(cls, msg):
5758
@classmethod
5859
def from_csv(cls, row):
5960
try:
60-
confidence = row[4] if len(row) == 5 else interfaces.HIGH.name
61-
return cls(row[0], int(row[1]), row[2], row[3], confidence)
61+
confidence = row[5] if len(row) == 6 else interfaces.HIGH.name
62+
return cls(row[0], int(row[1]), str(row[2]), row[3], row[4], confidence)
6263
except Exception as e:
6364
raise MalformedOutputLineException(row, e) from e
6465

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
abstract-class-instantiated:108:main:Abstract class 'BadMroAbstractMethods' with abstract methods instantiated
2-
abstract-class-instantiated:109:main:Abstract class 'BadClass' with abstract methods instantiated
3-
abstract-class-instantiated:110:main:Abstract class 'SecondBadClass' with abstract methods instantiated
4-
abstract-class-instantiated:111:main:Abstract class 'ThirdBadClass' with abstract methods instantiated
5-
abstract-class-instantiated:128:main2:Abstract class 'FourthBadClass' with abstract methods instantiated
1+
abstract-class-instantiated:108:4:main:Abstract class 'BadMroAbstractMethods' with abstract methods instantiated
2+
abstract-class-instantiated:109:4:main:Abstract class 'BadClass' with abstract methods instantiated
3+
abstract-class-instantiated:110:4:main:Abstract class 'SecondBadClass' with abstract methods instantiated
4+
abstract-class-instantiated:111:4:main:Abstract class 'ThirdBadClass' with abstract methods instantiated
5+
abstract-class-instantiated:128:4:main2:Abstract class 'FourthBadClass' with abstract methods instantiated
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
abstract-class-instantiated:19:main:Abstract class 'BadClass' with abstract methods instantiated
1+
abstract-class-instantiated:19:4:main:Abstract class 'BadClass' with abstract methods instantiated
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
abstract-method:47:Concrete:"Method 'bbbb' is abstract in class 'Abstract' but is not overridden"
2-
abstract-method:70:Container:"Method '__hash__' is abstract in class 'Structure' but is not overridden"
3-
abstract-method:70:Container:"Method '__iter__' is abstract in class 'Structure' but is not overridden"
4-
abstract-method:70:Container:"Method '__len__' is abstract in class 'Structure' but is not overridden"
5-
abstract-method:76:Sizable:"Method '__contains__' is abstract in class 'Structure' but is not overridden"
6-
abstract-method:76:Sizable:"Method '__hash__' is abstract in class 'Structure' but is not overridden"
7-
abstract-method:76:Sizable:"Method '__iter__' is abstract in class 'Structure' but is not overridden"
8-
abstract-method:82:Hashable:"Method '__contains__' is abstract in class 'Structure' but is not overridden"
9-
abstract-method:82:Hashable:"Method '__iter__' is abstract in class 'Structure' but is not overridden"
10-
abstract-method:82:Hashable:"Method '__len__' is abstract in class 'Structure' but is not overridden"
11-
abstract-method:87:Iterator:"Method '__contains__' is abstract in class 'Structure' but is not overridden"
12-
abstract-method:87:Iterator:"Method '__hash__' is abstract in class 'Structure' but is not overridden"
13-
abstract-method:87:Iterator:"Method '__len__' is abstract in class 'Structure' but is not overridden"
14-
abstract-method:106:BadComplexMro:"Method '__hash__' is abstract in class 'Structure' but is not overridden"
15-
abstract-method:106:BadComplexMro:"Method '__len__' is abstract in class 'AbstractSizable' but is not overridden"
16-
abstract-method:106:BadComplexMro:"Method 'length' is abstract in class 'AbstractSizable' but is not overridden"
1+
abstract-method:47:0:Concrete:Method 'bbbb' is abstract in class 'Abstract' but is not overridden
2+
abstract-method:70:0:Container:Method '__hash__' is abstract in class 'Structure' but is not overridden
3+
abstract-method:70:0:Container:Method '__iter__' is abstract in class 'Structure' but is not overridden
4+
abstract-method:70:0:Container:Method '__len__' is abstract in class 'Structure' but is not overridden
5+
abstract-method:76:0:Sizable:Method '__contains__' is abstract in class 'Structure' but is not overridden
6+
abstract-method:76:0:Sizable:Method '__hash__' is abstract in class 'Structure' but is not overridden
7+
abstract-method:76:0:Sizable:Method '__iter__' is abstract in class 'Structure' but is not overridden
8+
abstract-method:82:0:Hashable:Method '__contains__' is abstract in class 'Structure' but is not overridden
9+
abstract-method:82:0:Hashable:Method '__iter__' is abstract in class 'Structure' but is not overridden
10+
abstract-method:82:0:Hashable:Method '__len__' is abstract in class 'Structure' but is not overridden
11+
abstract-method:87:0:Iterator:Method '__contains__' is abstract in class 'Structure' but is not overridden
12+
abstract-method:87:0:Iterator:Method '__hash__' is abstract in class 'Structure' but is not overridden
13+
abstract-method:87:0:Iterator:Method '__len__' is abstract in class 'Structure' but is not overridden
14+
abstract-method:106:0:BadComplexMro:Method '__hash__' is abstract in class 'Structure' but is not overridden
15+
abstract-method:106:0:BadComplexMro:Method '__len__' is abstract in class 'AbstractSizable' but is not overridden
16+
abstract-method:106:0:BadComplexMro:Method 'length' is abstract in class 'AbstractSizable' but is not overridden
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
access-member-before-definition:8:Aaaa.__init__:Access to member '_var2' before its definition line 9
2-
access-member-before-definition:28:Bbbb.catchme:Access to member '_repo' before its definition line 30
1+
access-member-before-definition:8:15:Aaaa.__init__:Access to member '_var2' before its definition line 9
2+
access-member-before-definition:28:19:Bbbb.catchme:Access to member '_repo' before its definition line 30
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
no-member:10:Aaaa.__init__:Instance of 'Aaaa' has no '__name__' member:INFERENCE
2-
no-member:21:NewClass.__init__:Instance of 'NewClass' has no '__name__' member:INFERENCE
1+
no-member:10:14:Aaaa.__init__:Instance of 'Aaaa' has no '__name__' member:INFERENCE
2+
no-member:21:22:NewClass.__init__:Instance of 'NewClass' has no '__name__' member:INFERENCE
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
protected-access:19:MyClass.test:Access to a protected member _haha of a client class
2-
protected-access:41::Access to a protected member _protected of a client class
3-
protected-access:42::Access to a protected member _protected of a client class
4-
protected-access:43::Access to a protected member _cls_protected of a client class
5-
protected-access:44::Access to a protected member _cls_protected of a client class
6-
protected-access:58:Issue1031.incorrect_access:Access to a protected member _protected of a client class
7-
protected-access:72:Issue1802.__eq__:Access to a protected member __private of a client class
8-
protected-access:80:Issue1802.not_in_special:Access to a protected member _foo of a client class
9-
protected-access:100:Issue1802.__fake_special__:Access to a protected member _foo of a client class
1+
protected-access:19:14:MyClass.test:Access to a protected member _haha of a client class
2+
protected-access:41:0::Access to a protected member _protected of a client class
3+
protected-access:42:6::Access to a protected member _protected of a client class
4+
protected-access:43:0::Access to a protected member _cls_protected of a client class
5+
protected-access:44:6::Access to a protected member _cls_protected of a client class
6+
protected-access:58:19:Issue1031.incorrect_access:Access to a protected member _protected of a client class
7+
protected-access:72:48:Issue1802.__eq__:Access to a protected member __private of a client class
8+
protected-access:80:32:Issue1802.not_in_special:Access to a protected member _foo of a client class
9+
protected-access:100:32:Issue1802.__fake_special__:Access to a protected member _foo of a client class
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
anomalous-unicode-escape-in-string:5::"Anomalous Unicode escape in byte string: '\u'. String constant might be missing an r or u prefix."
2-
anomalous-unicode-escape-in-string:6::"Anomalous Unicode escape in byte string: '\U'. String constant might be missing an r or u prefix."
3-
anomalous-unicode-escape-in-string:8::"Anomalous Unicode escape in byte string: '\N'. String constant might be missing an r or u prefix."
1+
anomalous-unicode-escape-in-string:5:0::"Anomalous Unicode escape in byte string: '\u'. String constant might be missing an r or u prefix."
2+
anomalous-unicode-escape-in-string:6:0::"Anomalous Unicode escape in byte string: '\U'. String constant might be missing an r or u prefix."
3+
anomalous-unicode-escape-in-string:8:0::"Anomalous Unicode escape in byte string: '\N'. String constant might be missing an r or u prefix."

tests/functional/a/arguments.txt

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
no-value-for-parameter:46::No value for argument 'first_argument' in function call
2-
too-many-function-args:47::Too many positional arguments for function call
3-
no-value-for-parameter:49::No value for argument 'third_argument' in function call
4-
no-value-for-parameter:51::No value for argument 'first_argument' in function call
5-
no-value-for-parameter:51::No value for argument 'second_argument' in function call
6-
no-value-for-parameter:51::No value for argument 'third_argument' in function call
7-
too-many-function-args:53::Too many positional arguments for function call
8-
no-value-for-parameter:58::No value for argument 'first_argument' in function call
9-
unexpected-keyword-arg:58::Unexpected keyword argument 'bob' in function call
10-
unexpected-keyword-arg:59::Unexpected keyword argument 'coin' in function call
11-
redundant-keyword-arg:61::Argument 'one' passed by position and keyword in function call
12-
no-value-for-parameter:66::No value for argument 'arg' in lambda call
13-
no-value-for-parameter:71:method_tests:No value for argument 'arg' in staticmethod call
14-
no-value-for-parameter:72:method_tests:No value for argument 'arg' in staticmethod call
15-
no-value-for-parameter:74:method_tests:No value for argument 'arg' in classmethod call
16-
no-value-for-parameter:75:method_tests:No value for argument 'arg' in classmethod call
17-
no-value-for-parameter:77:method_tests:No value for argument 'arg' in method call
18-
no-value-for-parameter:78:method_tests:No value for argument 'arg' in unbound method call
19-
no-value-for-parameter:80:method_tests:No value for argument 'arg' in method call
20-
no-value-for-parameter:81:method_tests:No value for argument 'arg' in unbound method call
21-
no-value-for-parameter:110:TestStaticMethod.func:No value for argument 'first' in staticmethod call
22-
too-many-function-args:111:TestStaticMethod.func:Too many positional arguments for staticmethod call
23-
too-many-function-args:119:TypeCheckConstructor.test:Too many positional arguments for constructor call
24-
no-value-for-parameter:121:TypeCheckConstructor.test:No value for argument 'first' in constructor call
25-
no-value-for-parameter:121:TypeCheckConstructor.test:No value for argument 'second' in constructor call
26-
no-value-for-parameter:122:TypeCheckConstructor.test:No value for argument 'second' in constructor call
27-
unexpected-keyword-arg:122:TypeCheckConstructor.test:Unexpected keyword argument 'lala' in constructor call
28-
no-value-for-parameter:133:Test.test:No value for argument 'icon' in method call
29-
too-many-function-args:134:Test.test:Too many positional arguments for method call
30-
no-value-for-parameter:136::No value for argument 'icon' in method call
31-
no-value-for-parameter:163:no_context_but_redefined:No value for argument 'three' in function call
32-
no-value-for-parameter:163:no_context_but_redefined:No value for argument 'two' in function call
33-
no-value-for-parameter:166:no_context_one_elem:No value for argument 'three' in function call
34-
no-value-for-parameter:166:no_context_one_elem:No value for argument 'two' in function call
35-
unexpected-keyword-arg:202:namedtuple_replace_issue_1036:Unexpected keyword argument 'd' in method call
36-
unexpected-keyword-arg:202:namedtuple_replace_issue_1036:Unexpected keyword argument 'e' in method call
37-
no-value-for-parameter:215::No value for argument 'third' in function call
38-
no-value-for-parameter:216::No value for argument 'second' in function call
39-
unexpected-keyword-arg:217::Unexpected keyword argument 'fourth' in function call
1+
no-value-for-parameter:46:0::No value for argument 'first_argument' in function call
2+
too-many-function-args:47:0::Too many positional arguments for function call
3+
no-value-for-parameter:49:0::No value for argument 'third_argument' in function call
4+
no-value-for-parameter:51:0::No value for argument 'first_argument' in function call
5+
no-value-for-parameter:51:0::No value for argument 'second_argument' in function call
6+
no-value-for-parameter:51:0::No value for argument 'third_argument' in function call
7+
too-many-function-args:53:0::Too many positional arguments for function call
8+
no-value-for-parameter:58:0::No value for argument 'first_argument' in function call
9+
unexpected-keyword-arg:58:0::Unexpected keyword argument 'bob' in function call
10+
unexpected-keyword-arg:59:0::Unexpected keyword argument 'coin' in function call
11+
redundant-keyword-arg:61:0::Argument 'one' passed by position and keyword in function call
12+
no-value-for-parameter:66:0::No value for argument 'arg' in lambda call
13+
no-value-for-parameter:71:4:method_tests:No value for argument 'arg' in staticmethod call
14+
no-value-for-parameter:72:4:method_tests:No value for argument 'arg' in staticmethod call
15+
no-value-for-parameter:74:4:method_tests:No value for argument 'arg' in classmethod call
16+
no-value-for-parameter:75:4:method_tests:No value for argument 'arg' in classmethod call
17+
no-value-for-parameter:77:4:method_tests:No value for argument 'arg' in method call
18+
no-value-for-parameter:78:4:method_tests:No value for argument 'arg' in unbound method call
19+
no-value-for-parameter:80:4:method_tests:No value for argument 'arg' in method call
20+
no-value-for-parameter:81:4:method_tests:No value for argument 'arg' in unbound method call
21+
no-value-for-parameter:110:8:TestStaticMethod.func:No value for argument 'first' in staticmethod call
22+
too-many-function-args:111:8:TestStaticMethod.func:Too many positional arguments for staticmethod call
23+
too-many-function-args:119:8:TypeCheckConstructor.test:Too many positional arguments for constructor call
24+
no-value-for-parameter:121:8:TypeCheckConstructor.test:No value for argument 'first' in constructor call
25+
no-value-for-parameter:121:8:TypeCheckConstructor.test:No value for argument 'second' in constructor call
26+
no-value-for-parameter:122:8:TypeCheckConstructor.test:No value for argument 'second' in constructor call
27+
unexpected-keyword-arg:122:8:TypeCheckConstructor.test:Unexpected keyword argument 'lala' in constructor call
28+
no-value-for-parameter:133:8:Test.test:No value for argument 'icon' in method call
29+
too-many-function-args:134:8:Test.test:Too many positional arguments for method call
30+
no-value-for-parameter:136:0::No value for argument 'icon' in method call
31+
no-value-for-parameter:163:4:no_context_but_redefined:No value for argument 'three' in function call
32+
no-value-for-parameter:163:4:no_context_but_redefined:No value for argument 'two' in function call
33+
no-value-for-parameter:166:4:no_context_one_elem:No value for argument 'three' in function call
34+
no-value-for-parameter:166:4:no_context_one_elem:No value for argument 'two' in function call
35+
unexpected-keyword-arg:202:23:namedtuple_replace_issue_1036:Unexpected keyword argument 'd' in method call
36+
unexpected-keyword-arg:202:23:namedtuple_replace_issue_1036:Unexpected keyword argument 'e' in method call
37+
no-value-for-parameter:215:0::No value for argument 'third' in function call
38+
no-value-for-parameter:216:0::No value for argument 'second' in function call
39+
unexpected-keyword-arg:217:0::Unexpected keyword argument 'fourth' in function call
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
arguments-differ:12:Child.test:Parameters differ from overridden 'test' method
2-
arguments-differ:23:ChildDefaults.test:Parameters differ from overridden 'test' method
3-
arguments-differ:41:ClassmethodChild.func:Parameters differ from overridden 'func' method
4-
arguments-differ:68:VarargsChild.has_kwargs:Parameters differ from overridden 'has_kwargs' method
5-
arguments-differ:71:VarargsChild.no_kwargs:Parameters differ from overridden 'no_kwargs' method
6-
arguments-differ:172:SecondChangesArgs.test:Parameters differ from overridden 'test' method
1+
arguments-differ:12:4:Child.test:Parameters differ from overridden 'test' method
2+
arguments-differ:23:4:ChildDefaults.test:Parameters differ from overridden 'test' method
3+
arguments-differ:41:4:ClassmethodChild.func:Parameters differ from overridden 'func' method
4+
arguments-differ:68:4:VarargsChild.has_kwargs:Parameters differ from overridden 'has_kwargs' method
5+
arguments-differ:71:4:VarargsChild.no_kwargs:Parameters differ from overridden 'no_kwargs' method
6+
arguments-differ:172:4:SecondChangesArgs.test:Parameters differ from overridden 'test' method
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
arguments-differ:25:Foo.kwonly_1:Parameters differ from overridden 'kwonly_1' method
2-
arguments-differ:28:Foo.kwonly_2:Parameters differ from overridden 'kwonly_2' method
3-
arguments-differ:31:Foo.kwonly_3:Parameters differ from overridden 'kwonly_3' method
4-
arguments-differ:34:Foo.kwonly_4:Parameters differ from overridden 'kwonly_4' method
5-
arguments-differ:37:Foo.kwonly_5:Parameters differ from overridden 'kwonly_5' method
1+
arguments-differ:25:4:Foo.kwonly_1:Parameters differ from overridden 'kwonly_1' method
2+
arguments-differ:28:4:Foo.kwonly_2:Parameters differ from overridden 'kwonly_2' method
3+
arguments-differ:31:4:Foo.kwonly_3:Parameters differ from overridden 'kwonly_3' method
4+
arguments-differ:34:4:Foo.kwonly_4:Parameters differ from overridden 'kwonly_4' method
5+
arguments-differ:37:4:Foo.kwonly_5:Parameters differ from overridden 'kwonly_5' method
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
arguments-out-of-order:22:args_out_of_order:Positional arguments appear to be out of order
2-
arguments-out-of-order:23:args_out_of_order:Positional arguments appear to be out of order
3-
arguments-out-of-order:25:args_out_of_order:Positional arguments appear to be out of order
4-
arguments-out-of-order:51:args_out_of_order:Positional arguments appear to be out of order
1+
arguments-out-of-order:22:4:args_out_of_order:Positional arguments appear to be out of order
2+
arguments-out-of-order:23:4:args_out_of_order:Positional arguments appear to be out of order
3+
arguments-out-of-order:25:4:args_out_of_order:Positional arguments appear to be out of order
4+
arguments-out-of-order:51:4:args_out_of_order:Positional arguments appear to be out of order
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
assert-on-string-literal:3::Assert statement has a string literal as its first argument. The assert will never fail.
2-
assert-on-string-literal:4::Assert statement has a string literal as its first argument. The assert will always fail.
1+
assert-on-string-literal:3:0::Assert statement has a string literal as its first argument. The assert will never fail.
2+
assert-on-string-literal:4:0::Assert statement has a string literal as its first argument. The assert will always fail.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
assert-on-tuple:5::Assert called on a 2-item-tuple. Did you mean 'assert x,y'?
2-
assert-on-tuple:11::Assert called on a 2-item-tuple. Did you mean 'assert x,y'?
1+
assert-on-tuple:5:0::Assert called on a 2-item-tuple. Did you mean 'assert x,y'?
2+
assert-on-tuple:11:0::Assert called on a 2-item-tuple. Did you mean 'assert x,y'?

0 commit comments

Comments
 (0)