Skip to content

Commit 254e49b

Browse files
committed
adds more documentation
1 parent f153397 commit 254e49b

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,14 @@ Code Analysis for ugly_code.m
4242
A report like this will be printed for every function in the file, for script-files, and for classes. The more serious of these comments will be highlighted in red, whereas less important ones will stay black. Every line number is clickable and opens directly in the editor.
4343

4444
Additionally, this comes with a settings file `check_settings.m`, which can change the thresholds on all warnings, and even enable or disable whole categories of warnings entirely.
45+
46+
Contributing
47+
------------
48+
49+
While this file works well for our current applications, it is a complex piece of software, and it has not been thoroughly tested yet. If you find a bug, or would like to see a new feature, or would like to contribute a new feature, please feel free to open an issue or pull request.
50+
51+
However, this is not my job, and I can not guarantee an immediate response, or support for every problem. That said, the code is available under the terms of the BSD 3-clause license, so feel free to use it however you like as long as you honor my authorship of it.
52+
53+
Also, please bear in mind that all of the warnings generated by this program are just that: Warnings. They are *not* laws. If a slightly longer line improves readability, please *do not* make it shorter just to make the style analyzer happy. Please watch [this video](https://www.youtube.com/watch?v=wf-BqAjZb8M) for some context.
54+
55+
And finally, while this style checker can find many issues, it is by no means perfect. It can not comment on whether your variable names are good or not, whether your comments are out of date or not, or whether your code makes intuitive sense when reading, or just results in confusion. For more in-depth heuristics on how to improve these aspects of your code, pleas read the wonderful [MATLAB Style Guidelines 1.0](http://mathworks.com/matlabcentral/fileexchange/46056-matlab-style-guidelines-2-0).

analyze_file.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
% 'Class', or 'Script'.
1717
% - filename: the FILENAME.
1818

19+
% (c) 2016, Bastian Bechtold
20+
% This code is licensed under the terms of the BSD 3-clause license
21+
1922
beginnings = {'for' 'parfor' 'while' 'if' 'switch' 'classdef' ...
2023
'events' 'properties' 'enumeration' 'methods' ...
2124
'function'};

check.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ function check(filename)
3333
% - no spaces around some operators
3434
% - use of dangerous functions like eval
3535

36+
% (c) 2016, Bastian Bechtold
37+
% This code is licensed under the terms of the BSD 3-clause license
3638

3739
[requiredFiles, requiredProducts] = ...
3840
matlab.codetools.requiredFilesAndProducts(filename);

0 commit comments

Comments
 (0)