-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#245 Add test-case for line continuation issue
- Loading branch information
1 parent
14ebe03
commit 0737748
Showing
11 changed files
with
347 additions
and
0 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
tests/style/bug_245_excessive_line_continuation/expected_out.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="stylesheet" href="file:../../../docs/style.css"> | ||
<title>MISS_HIT Report</title> | ||
</head> | ||
<body> | ||
<header>MISS_HIT Report</header> | ||
<main> | ||
<div></div> | ||
<h1>Issues identified</h1> | ||
<section> | ||
<h2>test_1.m</h2> | ||
<div class="message"><a href="matlab:opentoline('test_1.m')">test_1.m:</a> style: violates naming scheme for scripts</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 3, 7)">test_1.m: line 3:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 4, 5)">test_1.m: line 4:</a> style: indentation not correct, should be 6 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 4, 7)">test_1.m: line 4:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 5, 5)">test_1.m: line 5:</a> style: indentation not correct, should be 6 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 5, 7)">test_1.m: line 5:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 6, 5)">test_1.m: line 6:</a> style: indentation not correct, should be 6 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 6, 7)">test_1.m: line 6:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 7, 5)">test_1.m: line 7:</a> style: indentation not correct, should be 6 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 7, 7)">test_1.m: line 7:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 8, 5)">test_1.m: line 8:</a> style: indentation not correct, should be 6 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 8, 7)">test_1.m: line 8:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 9, 5)">test_1.m: line 9:</a> style: indentation not correct, should be 6 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 9, 6)">test_1.m: line 9:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 10, 5)">test_1.m: line 10:</a> style: indentation not correct, should be 5 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 10, 6)">test_1.m: line 10:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 11, 5)">test_1.m: line 11:</a> style: indentation not correct, should be 5 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 11, 6)">test_1.m: line 11:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 12, 5)">test_1.m: line 12:</a> style: indentation not correct, should be 5 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 12, 6)">test_1.m: line 12:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 13, 5)">test_1.m: line 13:</a> style: indentation not correct, should be 5 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 13, 6)">test_1.m: line 13:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 14, 5)">test_1.m: line 14:</a> style: indentation not correct, should be 5 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 14, 6)">test_1.m: line 14:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_1.m', 15, 5)">test_1.m: line 15:</a> style: indentation not correct, should be 5 spaces, not 4</div> | ||
<h2>test_2.m</h2> | ||
<div class="message"><a href="matlab:opentoline('test_2.m')">test_2.m:</a> style: violates naming scheme for scripts</div> | ||
<h2>test_3.m</h2> | ||
<div class="message"><a href="matlab:opentoline('test_3.m')">test_3.m:</a> style: violates naming scheme for scripts</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 3, 9)">test_3.m: line 3:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 4, 5)">test_3.m: line 4:</a> style: indentation not correct, should be 8 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 4, 12)">test_3.m: line 4:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 5, 5)">test_3.m: line 5:</a> style: indentation not correct, should be 11 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 5, 7)">test_3.m: line 5:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 6, 5)">test_3.m: line 6:</a> style: indentation not correct, should be 6 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 6, 22)">test_3.m: line 6:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 7, 5)">test_3.m: line 7:</a> style: indentation not correct, should be 21 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 7, 12)">test_3.m: line 7:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 8, 5)">test_3.m: line 8:</a> style: indentation not correct, should be 11 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 8, 7)">test_3.m: line 8:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 9, 5)">test_3.m: line 9:</a> style: indentation not correct, should be 6 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 10, 5)">test_3.m: line 10:</a> style: indentation not correct, should be 5 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 10, 6)">test_3.m: line 10:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 11, 5)">test_3.m: line 11:</a> style: indentation not correct, should be 10 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 11, 6)">test_3.m: line 11:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 12, 5)">test_3.m: line 12:</a> style: indentation not correct, should be 20 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 12, 6)">test_3.m: line 12:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 13, 5)">test_3.m: line 13:</a> style: indentation not correct, should be 5 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 13, 6)">test_3.m: line 13:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 14, 5)">test_3.m: line 14:</a> style: indentation not correct, should be 10 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 14, 6)">test_3.m: line 14:</a> style: continuation must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_3.m', 15, 5)">test_3.m: line 15:</a> style: indentation not correct, should be 7 spaces, not 4</div> | ||
<h2>test_4.m</h2> | ||
<div class="message"><a href="matlab:opentoline('test_4.m')">test_4.m:</a> style: violates naming scheme for scripts</div> | ||
</section> | ||
</main> | ||
</body> | ||
</html> |
154 changes: 154 additions & 0 deletions
154
tests/style/bug_245_excessive_line_continuation/expected_out.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
=== PLAIN MODE === | ||
test_1.m: style: violates naming scheme for scripts | ||
In test_1.m, line 3 | ||
| a = b(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 4 | ||
| c(... | ||
| ^ style: indentation not correct, should be 6 spaces, not 4 [fixed] | ||
In test_1.m, line 4 | ||
| c(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 5 | ||
| d(... | ||
| ^ style: indentation not correct, should be 6 spaces, not 4 [fixed] | ||
In test_1.m, line 5 | ||
| d(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 6 | ||
| e(... | ||
| ^ style: indentation not correct, should be 6 spaces, not 4 [fixed] | ||
In test_1.m, line 6 | ||
| e(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 7 | ||
| f(... | ||
| ^ style: indentation not correct, should be 6 spaces, not 4 [fixed] | ||
In test_1.m, line 7 | ||
| f(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 8 | ||
| g(... | ||
| ^ style: indentation not correct, should be 6 spaces, not 4 [fixed] | ||
In test_1.m, line 8 | ||
| g(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 9 | ||
| h... | ||
| ^ style: indentation not correct, should be 6 spaces, not 4 [fixed] | ||
In test_1.m, line 9 | ||
| h... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 10 | ||
| )... | ||
| ^ style: indentation not correct, should be 5 spaces, not 4 [fixed] | ||
In test_1.m, line 10 | ||
| )... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 11 | ||
| )... | ||
| ^ style: indentation not correct, should be 5 spaces, not 4 [fixed] | ||
In test_1.m, line 11 | ||
| )... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 12 | ||
| )... | ||
| ^ style: indentation not correct, should be 5 spaces, not 4 [fixed] | ||
In test_1.m, line 12 | ||
| )... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 13 | ||
| )... | ||
| ^ style: indentation not correct, should be 5 spaces, not 4 [fixed] | ||
In test_1.m, line 13 | ||
| )... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 14 | ||
| )... | ||
| ^ style: indentation not correct, should be 5 spaces, not 4 [fixed] | ||
In test_1.m, line 14 | ||
| )... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_1.m, line 15 | ||
| ); | ||
| ^ style: indentation not correct, should be 5 spaces, not 4 [fixed] | ||
test_2.m: style: violates naming scheme for scripts | ||
test_3.m: style: violates naming scheme for scripts | ||
In test_3.m, line 3 | ||
| a = foo(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_3.m, line 4 | ||
| potato(... | ||
| ^^^^^^ style: indentation not correct, should be 8 spaces, not 4 [fixed] | ||
In test_3.m, line 4 | ||
| potato(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_3.m, line 5 | ||
| x(... | ||
| ^ style: indentation not correct, should be 11 spaces, not 4 [fixed] | ||
In test_3.m, line 5 | ||
| x(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_3.m, line 6 | ||
| kitten_explosion(... | ||
| ^^^^^^^^^^^^^^^^ style: indentation not correct, should be 6 spaces, not 4 [fixed] | ||
In test_3.m, line 6 | ||
| kitten_explosion(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_3.m, line 7 | ||
| wibble(... | ||
| ^^^^^^ style: indentation not correct, should be 21 spaces, not 4 [fixed] | ||
In test_3.m, line 7 | ||
| wibble(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_3.m, line 8 | ||
| y(... | ||
| ^ style: indentation not correct, should be 11 spaces, not 4 [fixed] | ||
In test_3.m, line 8 | ||
| y(... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_3.m, line 9 | ||
| 12345 ... | ||
| ^^^^^ style: indentation not correct, should be 6 spaces, not 4 [fixed] | ||
In test_3.m, line 10 | ||
| )... | ||
| ^ style: indentation not correct, should be 5 spaces, not 4 [fixed] | ||
In test_3.m, line 10 | ||
| )... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_3.m, line 11 | ||
| )... | ||
| ^ style: indentation not correct, should be 10 spaces, not 4 [fixed] | ||
In test_3.m, line 11 | ||
| )... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_3.m, line 12 | ||
| )... | ||
| ^ style: indentation not correct, should be 20 spaces, not 4 [fixed] | ||
In test_3.m, line 12 | ||
| )... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_3.m, line 13 | ||
| )... | ||
| ^ style: indentation not correct, should be 5 spaces, not 4 [fixed] | ||
In test_3.m, line 13 | ||
| )... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_3.m, line 14 | ||
| )... | ||
| ^ style: indentation not correct, should be 10 spaces, not 4 [fixed] | ||
In test_3.m, line 14 | ||
| )... | ||
| ^^^^ style: continuation must be preceeded by whitespace [fixed] | ||
In test_3.m, line 15 | ||
| ); | ||
| ^ style: indentation not correct, should be 7 spaces, not 4 [fixed] | ||
test_4.m: style: violates naming scheme for scripts | ||
MISS_HIT Style Summary: 4 file(s) analysed, 51 style issue(s) | ||
|
||
=== HTML MODE === | ||
MISS_HIT Style Summary: 4 file(s) analysed, 51 style issue(s) | ||
|
||
=== ! BROKEN FIXES ! === | ||
Fixing is not idempotent for ./test_1.m | ||
Fixing is not idempotent for ./test_3.m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
suppress_rule: "copyright_notice" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
% Taken from #245 | ||
|
||
a = b(... | ||
c(... | ||
d(... | ||
e(... | ||
f(... | ||
g(... | ||
h... | ||
)... | ||
)... | ||
)... | ||
)... | ||
)... | ||
); |
15 changes: 15 additions & 0 deletions
15
tests/style/bug_245_excessive_line_continuation/test_1.m_fixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
% Taken from #245 | ||
|
||
a = b( ... | ||
c( ... | ||
d( ... | ||
e( ... | ||
f( ... | ||
g( ... | ||
h ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
% Taken from #245 | ||
|
||
a = b( ... | ||
c( ... | ||
d( ... | ||
e( ... | ||
f( ... | ||
g( ... | ||
h ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
); |
15 changes: 15 additions & 0 deletions
15
tests/style/bug_245_excessive_line_continuation/test_2.m_fixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
% Taken from #245 | ||
|
||
a = b( ... | ||
c( ... | ||
d( ... | ||
e( ... | ||
f( ... | ||
g( ... | ||
h ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
% (c) Copyright 2021 Florian Schanda | ||
|
||
a = foo(... | ||
potato(... | ||
x(... | ||
kitten_explosion(... | ||
wibble(... | ||
y(... | ||
12345 ... | ||
)... | ||
)... | ||
)... | ||
)... | ||
)... | ||
); |
15 changes: 15 additions & 0 deletions
15
tests/style/bug_245_excessive_line_continuation/test_3.m_fixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
% (c) Copyright 2021 Florian Schanda | ||
|
||
a = foo( ... | ||
potato( ... | ||
x( ... | ||
kitten_explosion( ... | ||
wibble( ... | ||
y( ... | ||
12345 ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
% (c) Copyright 2021 Florian Schanda | ||
|
||
a = foo( ... | ||
potato( ... | ||
x( ... | ||
kitten_explosion( ... | ||
wibble( ... | ||
y( ... | ||
12345 ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
); |
15 changes: 15 additions & 0 deletions
15
tests/style/bug_245_excessive_line_continuation/test_4.m_fixed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
% (c) Copyright 2021 Florian Schanda | ||
|
||
a = foo( ... | ||
potato( ... | ||
x( ... | ||
kitten_explosion( ... | ||
wibble( ... | ||
y( ... | ||
12345 ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
) ... | ||
); |