-
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.
- Loading branch information
1 parent
b2e3f5e
commit 313e2e0
Showing
4 changed files
with
201 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
tests/style/issue_265_alternative_indent/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,49 @@ | ||
<!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_from_ticket.m</h2> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 1, 19)">test_from_ticket.m: line 1:</a> style: violates naming scheme for function</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 1, 19)">test_from_ticket.m: line 1:</a> style: Could not find any copyright notice</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 2)">test_from_ticket.m: line 2:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 3)">test_from_ticket.m: line 3:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 4)">test_from_ticket.m: line 4:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 5)">test_from_ticket.m: line 5:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 6)">test_from_ticket.m: line 6:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 8)">test_from_ticket.m: line 8:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 9)">test_from_ticket.m: line 9:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 11)">test_from_ticket.m: line 11:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 13)">test_from_ticket.m: line 13:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 14)">test_from_ticket.m: line 14:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 14, 16)">test_from_ticket.m: line 14:</a> style: = must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 14, 17)">test_from_ticket.m: line 14:</a> style: violates naming scheme for nested</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 15, 5)">test_from_ticket.m: line 15:</a> style: indentation not correct, should be 8 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 15, 81)">test_from_ticket.m: line 15:</a> style: line exceeds 80 characters</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 16, 5)">test_from_ticket.m: line 16:</a> style: end statement with a semicolon</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 16, 5)">test_from_ticket.m: line 16:</a> style: indentation not correct, should be 8 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 17, 5)">test_from_ticket.m: line 17:</a> style: end statement with a semicolon</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 17, 5)">test_from_ticket.m: line 17:</a> style: indentation not correct, should be 8 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 18)">test_from_ticket.m: line 18:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 20)">test_from_ticket.m: line 20:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 21)">test_from_ticket.m: line 21:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 21, 16)">test_from_ticket.m: line 21:</a> style: = must be preceeded by whitespace</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 21, 17)">test_from_ticket.m: line 21:</a> style: violates naming scheme for nested</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 22, 5)">test_from_ticket.m: line 22:</a> style: indentation not correct, should be 8 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 23, 5)">test_from_ticket.m: line 23:</a> style: end statement with a semicolon</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 23, 5)">test_from_ticket.m: line 23:</a> style: indentation not correct, should be 8 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 24, 5)">test_from_ticket.m: line 24:</a> style: end statement with a semicolon</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 24, 5)">test_from_ticket.m: line 24:</a> style: indentation not correct, should be 8 spaces, not 4</div> | ||
<div class="message"><a href="matlab:opentoline('test_from_ticket.m', 25)">test_from_ticket.m: line 25:</a> style: indentation not correct, should be 4 spaces, not 0</div> | ||
</section> | ||
</main> | ||
</body> | ||
</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,98 @@ | ||
=== PLAIN MODE === | ||
In test_from_ticket.m, line 1 | ||
| function output = mainfun(input) | ||
| ^^^^^^^ style: violates naming scheme for function [naming_functions] | ||
In test_from_ticket.m, line 1 | ||
| function output = mainfun(input) | ||
| ^^^^^^^ style: Could not find any copyright notice [copyright_notice] | ||
In test_from_ticket.m, line 2 | ||
| % | ||
| ^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 3 | ||
| % docstring for mainfun | ||
| ^^^^^^^^^^^^^^^^^^^^^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 4 | ||
| % copyright ... | ||
| ^^^^^^^^^^^^^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 5 | ||
| % the main-function should be flattened without indentation | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 6 | ||
| % | ||
| ^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 8 | ||
| statement1; | ||
| ^^^^^^^^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 9 | ||
| statement2; | ||
| ^^^^^^^^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 11 | ||
| %% -------- local functions ------- | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 13 | ||
| % comment for relatively short localfun 1 | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 14 | ||
| function output=localfun1(input) | ||
| ^^^^^^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 14 | ||
| function output=localfun1(input) | ||
| ^ style: = must be preceeded by whitespace [fixed] [whitespace_assignment] | ||
In test_from_ticket.m, line 14 | ||
| function output=localfun1(input) | ||
| ^^^^^^^^^ style: violates naming scheme for nested [naming_functions] | ||
In test_from_ticket.m, line 15 | ||
| % local-functions, or functions with an "end" at the bottom should be indented | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ style: indentation not correct, should be 8 spaces, not 4 [fixed] [indentation] | ||
In test_from_ticket.m, line 15 | ||
| % local-functions, or functions with an "end" at the bottom should be indented | ||
| ^^^ style: line exceeds 80 characters [line_length] | ||
In test_from_ticket.m, line 16 | ||
| statement1 | ||
| ^^^^^^^^^^ style: end statement with a semicolon [fixed] [end_of_statements] | ||
In test_from_ticket.m, line 16 | ||
| statement1 | ||
| ^^^^^^^^^^ style: indentation not correct, should be 8 spaces, not 4 [fixed] [indentation] | ||
In test_from_ticket.m, line 17 | ||
| statement2 | ||
| ^^^^^^^^^^ style: end statement with a semicolon [fixed] [end_of_statements] | ||
In test_from_ticket.m, line 17 | ||
| statement2 | ||
| ^^^^^^^^^^ style: indentation not correct, should be 8 spaces, not 4 [fixed] [indentation] | ||
In test_from_ticket.m, line 18 | ||
| end | ||
| ^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 20 | ||
| % comment for relatively short localfun 2 | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 21 | ||
| function output=localfun2(input) | ||
| ^^^^^^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
In test_from_ticket.m, line 21 | ||
| function output=localfun2(input) | ||
| ^ style: = must be preceeded by whitespace [fixed] [whitespace_assignment] | ||
In test_from_ticket.m, line 21 | ||
| function output=localfun2(input) | ||
| ^^^^^^^^^ style: violates naming scheme for nested [naming_functions] | ||
In test_from_ticket.m, line 22 | ||
| % short comment on | ||
| ^^^^^^^^^^^^^^^^^^ style: indentation not correct, should be 8 spaces, not 4 [fixed] [indentation] | ||
In test_from_ticket.m, line 23 | ||
| statement1 | ||
| ^^^^^^^^^^ style: end statement with a semicolon [fixed] [end_of_statements] | ||
In test_from_ticket.m, line 23 | ||
| statement1 | ||
| ^^^^^^^^^^ style: indentation not correct, should be 8 spaces, not 4 [fixed] [indentation] | ||
In test_from_ticket.m, line 24 | ||
| statement2 | ||
| ^^^^^^^^^^ style: end statement with a semicolon [fixed] [end_of_statements] | ||
In test_from_ticket.m, line 24 | ||
| statement2 | ||
| ^^^^^^^^^^ style: indentation not correct, should be 8 spaces, not 4 [fixed] [indentation] | ||
In test_from_ticket.m, line 25 | ||
| end | ||
| ^^^ style: indentation not correct, should be 4 spaces, not 0 [fixed] [indentation] | ||
MISS_HIT Style Summary: 1 file(s) analysed, 31 style issue(s) | ||
|
||
=== HTML MODE === | ||
MISS_HIT Style Summary: 1 file(s) analysed, 31 style issue(s) |
27 changes: 27 additions & 0 deletions
27
tests/style/issue_265_alternative_indent/test_from_ticket.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,27 @@ | ||
function output = mainfun(input) | ||
% | ||
% docstring for mainfun | ||
% copyright ... | ||
% the main-function should be flattened without indentation | ||
% | ||
|
||
statement1; | ||
statement2; | ||
|
||
%% -------- local functions ------- | ||
|
||
% comment for relatively short localfun 1 | ||
function output=localfun1(input) | ||
% local-functions, or functions with an "end" at the bottom should be indented | ||
statement1 | ||
statement2 | ||
end | ||
|
||
% comment for relatively short localfun 2 | ||
function output=localfun2(input) | ||
% short comment on | ||
statement1 | ||
statement2 | ||
end | ||
|
||
end |
27 changes: 27 additions & 0 deletions
27
tests/style/issue_265_alternative_indent/test_from_ticket.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,27 @@ | ||
function output = mainfun(input) | ||
% | ||
% docstring for mainfun | ||
% copyright ... | ||
% the main-function should be flattened without indentation | ||
% | ||
|
||
statement1; | ||
statement2; | ||
|
||
%% -------- local functions ------- | ||
|
||
% comment for relatively short localfun 1 | ||
function output = localfun1(input) | ||
% local-functions, or functions with an "end" at the bottom should be indented | ||
statement1; | ||
statement2; | ||
end | ||
|
||
% comment for relatively short localfun 2 | ||
function output = localfun2(input) | ||
% short comment on | ||
statement1; | ||
statement2; | ||
end | ||
|
||
end |