@@ -110,23 +110,23 @@ function print_code_report(func, mlintInfo, indentation)
110110 fprintf(' \n ' );
111111 end
112112
113- reports = [check_documentation (func ) ...
114- check_comments (func .body ) ...
115- check_mlint_warnings (mlintInfo , func .body ) ...
116- check_indentation (func ) ...
117- check_line_length (func .body ) ...
118- check_variables (func .variables , func .body , ' variable' ) ...
119- check_operators (func .body ) ...
120- check_eval (func .body )];
113+ reports = [report_documentation (func ) ...
114+ report_comments (func .body ) ...
115+ report_mlint_warnings (mlintInfo , func .body ) ...
116+ report_indentation (func ) ...
117+ report_line_length (func .body ) ...
118+ report_variables (func .variables , func .body , ' variable' ) ...
119+ report_operators (func .body ) ...
120+ report_eval (func .body )];
121121
122122 if any(strcmp(func .type , functypes ))
123123 reports = [reports ...
124- check_variables (func .name , func .body , ...
125- ' function' ) ...
126- check_variables (func .arguments , func .body , ...
127- ' function argument' ) ...
128- check_variables (func .returns , func .body , ...
129- ' return argument' )];
124+ report_variables (func .name , func .body , ...
125+ ' function' ) ...
126+ report_variables (func .arguments , func .body , ...
127+ ' function argument' ) ...
128+ report_variables (func .returns , func .body , ...
129+ ' return argument' )];
130130 end
131131
132132 if ~isempty(reports )
@@ -410,8 +410,8 @@ function print_report(report, indentation, filename)
410410end
411411
412412
413- function report = check_comments (tokenlist )
414- % CHECK_COMMENTS REPORTs on the number of comments in TOKENLIST.
413+ function report = report_comments (tokenlist )
414+ % REPORT_COMMENTS REPORTs on the number of comments in TOKENLIST.
415415%
416416% Comments should not describe the code itself, but provide context
417417% for reading the code. In other words, they should describe the
@@ -452,8 +452,8 @@ function print_report(report, indentation, filename)
452452end
453453
454454
455- function report = check_documentation (func_struct )
456- % CHECK_DOCUMENTATION REPORTs on problems with the documentation of the
455+ function report = report_documentation (func_struct )
456+ % REPORT_DOCUMENTATION REPORTs on problems with the documentation of the
457457% function in FUNC_STRUCT.
458458%
459459% Documentation is very important for humans. Code is not primarily
@@ -543,8 +543,8 @@ function print_report(report, indentation, filename)
543543end
544544
545545
546- function report = check_eval (tokenlist )
547- % CHECK_EVAL REPORTs on uses of `eval` in TOKENLIST.
546+ function report = report_eval (tokenlist )
547+ % REPORT_EVAL REPORTs on uses of `eval` in TOKENLIST.
548548%
549549% Using `eval` is *never* the right thing to do. There is *always*
550550% a better way. Seriously.
@@ -571,8 +571,8 @@ function print_report(report, indentation, filename)
571571end
572572
573573
574- function report = check_operators (tokenlist )
575- % CHECK_OPERATORS reports on incorrectly used operators in TOKENLIST
574+ function report = report_operators (tokenlist )
575+ % REPORT_OPERATORS reports on incorrectly used operators in TOKENLIST
576576%
577577% To improve readability, operators should be treated like punctuation
578578% in regular English, i.e. be preceded and followed by spaces just like
@@ -632,8 +632,8 @@ function print_report(report, indentation, filename)
632632end
633633
634634
635- function report = check_variables (varlist , tokenlist , description )
636- % CHECK_VARIABLES checks all variables in VARLIST, as used in TOKENLIST,
635+ function report = report_variables (varlist , tokenlist , description )
636+ % REPORT_VARIABLES checks all variables in VARLIST, as used in TOKENLIST,
637637% and REPORTs on problems with these variables. DESCRIPTION is used
638638% to describe the variable in REPORT.
639639%
@@ -720,8 +720,8 @@ function print_report(report, indentation, filename)
720720end
721721
722722
723- function report = check_mlint_warnings (mlint_info , tokenlist )
724- % CHECK_MLINT_WARNINGS reads through MLINT_INFO and REPORTs on all messages
723+ function report = report_mlint_warnings (mlint_info , tokenlist )
724+ % REPORT_MLINT_WARNINGS reads through MLINT_INFO and REPORTs on all messages
725725% that refer to the code in TOKENLIST.
726726%
727727% returns a struct array REPORT with fields `token`, `message`, and
@@ -782,8 +782,8 @@ function print_report(report, indentation, filename)
782782end
783783
784784
785- function report = check_line_length (tokenlist )
786- % CHECK_LINE_LENGTH walks through TOKENLIST and REPORTs on the length of
785+ function report = report_line_length (tokenlist )
786+ % REPORT_LINE_LENGTH walks through TOKENLIST and REPORTs on the length of
787787% all lines.
788788%
789789% While line length should not matter with today's high-resolution
@@ -831,8 +831,8 @@ function print_report(report, indentation, filename)
831831end
832832
833833
834- function report = check_indentation (func_struct )
835- % CHECK_INDENTATION parses FUNC_STRUCT and REPORTs about its indentation.
834+ function report = report_indentation (func_struct )
835+ % REPORT_INDENTATION parses FUNC_STRUCT and REPORTs about its indentation.
836836%
837837% Indentation is one of the primary means of making code easy to read,
838838% by highlighting the structure of the code. If code is not indented
0 commit comments