Fix leftpad in SourceReferenceFormatterHuman

This commit is contained in:
a3d4
2020-04-24 00:34:24 +02:00
parent 6d98b907ef
commit 8717c073a6
10 changed files with 173 additions and 19 deletions
+50
View File
@@ -0,0 +1,50 @@
Warning: Source file does not specify required compiler version!
--> message_format/input.sol
Warning: Unused local variable.
--> message_format/input.sol:9:27:
|
9 | function f() public { int x; }
| ^^^^^
Warning: Unused local variable.
--> message_format/input.sol:10:27:
|
10 | function g() public { int x; }
| ^^^^^
Warning: Unused local variable.
--> message_format/input.sol:99:14:
|
99 | /**/ int a; /**/
| ^^^^^
Warning: Unused local variable.
--> message_format/input.sol:100:14:
|
100 | /**/ int b; /**/
| ^^^^^
Warning: Unused local variable.
--> message_format/input.sol:101:14:
|
101 | /**/ int c; /**/
| ^^^^^
Warning: Function state mutability can be restricted to pure
--> message_format/input.sol:9:5:
|
9 | function f() public { int x; }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Function state mutability can be restricted to pure
--> message_format/input.sol:10:5:
|
10 | function g() public { int x; }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning: Function state mutability can be restricted to pure
--> message_format/input.sol:11:5:
|
11 | function h() public {
| ^ (Relevant source part starts here and spans across multiple lines).
+103
View File
@@ -0,0 +1,103 @@
// checks that error messages around power-or-10 lines are formatted correctly
contract C {
function f() public { int x; }
function g() public { int x; }
function h() public {
/**/ int a; /**/
/**/ int b; /**/
/**/ int c; /**/
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
Warning: Source file does not specify required compiler version!
--> too_long_line/input.sol
--> too_long_line/input.sol
Error: Identifier not found or not unique.
--> too_long_line/input.sol:2:164:
@@ -1,5 +1,5 @@
Warning: Source file does not specify required compiler version!
--> too_long_line_both_sides_short/input.sol
--> too_long_line_both_sides_short/input.sol
Error: Identifier not found or not unique.
--> too_long_line_both_sides_short/input.sol:2:15:
+1 -1
View File
@@ -1,5 +1,5 @@
Warning: Source file does not specify required compiler version!
--> too_long_line_edge_in/input.sol
--> too_long_line_edge_in/input.sol
Error: Identifier not found or not unique.
--> too_long_line_edge_in/input.sol:2:36:
+1 -1
View File
@@ -1,5 +1,5 @@
Warning: Source file does not specify required compiler version!
--> too_long_line_edge_out/input.sol
--> too_long_line_edge_out/input.sol
Error: Identifier not found or not unique.
--> too_long_line_edge_out/input.sol:2:37:
@@ -1,5 +1,5 @@
Warning: Source file does not specify required compiler version!
--> too_long_line_left_short/input.sol
--> too_long_line_left_short/input.sol
Error: Identifier not found or not unique.
--> too_long_line_left_short/input.sol:2:15:
@@ -5,4 +5,4 @@ Error: No visibility specified. Did you intend to add "public"?
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Source file does not specify required compiler version!
--> too_long_line_multiline/input.sol
--> too_long_line_multiline/input.sol
@@ -1,5 +1,5 @@
Warning: Source file does not specify required compiler version!
--> too_long_line_right_short/input.sol
--> too_long_line_right_short/input.sol
Error: Identifier not found or not unique.
--> too_long_line_right_short/input.sol:2:164: