MatlabCodeAnalyzer
MatlabCodeAnalyzer copied to clipboard
&&... makes check throw an error
Using latest commit from master (fc93e9a) and Matlab 2017b:
check with throw an error when checking lines that ends with compact statements, e.g. &&... or ||....
Steps to reproduce:
- Create a new file testDots.m and paste the following:
function third = testDots()
% TESTDOTS tests dots immediately following something else
first = true;
second = false;
third = first &&...
second;
end
- Run
check testDots.m - The following output is produced:
>> check testDots.m
Error using tokenize_code (line 123)
unknown operator '&&...'
Error in check (line 47)
tokens = tokenize_code(source_code);
Expected behaviour:
- A warning that there should be a space between
&&and...
Thank you for your bug report. Would you like to create a pull request that fixes the error? I am currently not able to work on this project and would appreciate the help.
Starting work on this issue
Same for ||....
I've implemented a fix in #12.
Pull request #16 fixes this issue