Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matlab indentation check #2

Merged
merged 9 commits into from
Sep 6, 2019

Conversation

bertramr
Copy link
Contributor

The indentation check for try catch block didn't work as expected.
Following example files should show the problem.
With adding try catch as keywords, beginnings and middles this should be solved.

However the checker doesn't find the documentation string. Probably due to the access properties.

@bastibe
Copy link
Owner

bastibe commented May 15, 2017

Thank you for this contribution.

Is there a particular reason that you moved the list of keywords etc. to the settings file? Why would the user need to customize these?

I very much like your test file. I should definitely add more of those. They should probably live in a separate package, though.

@bertramr
Copy link
Contributor Author

bertramr commented May 16, 2017

I don't think, that the user would customize the keywords, but I was looking for only one place, where to define all these keywords and I didn't want to use an additional file. Otherwise it is necessary to change 3 files ( tokenize_code.m check.m analyze_file.m) to add keywords like for the try catch block.

One could even consider to use matlabs iskeyword command.

Moving test files to a separate package is a good idea - imho.

bertramr pushed a commit to bertramr/MatlabCodeAnalyzer that referenced this pull request May 16, 2017
Resolve "Fix matlab identation check"

Closes bastibe#2

See merge request !2
@bastibe
Copy link
Owner

bastibe commented Jul 4, 2017

Sorry I forgot about your pull request. Is this ready to be merged, in your opinion? It looks good to me.

@ssordopalacios
Copy link
Contributor

I just found this repository and have gotten a ton of mileage from the function! But I did notice that the switch-case indentation was still broken in the master branch. @bertramr, @bastibe, is there anything left to be done here before merging? I am happy to help if so, but it looks good to me as well.

@bastibe
Copy link
Owner

bastibe commented Jul 26, 2019

I'm on vacation right now, and can't check if this pull request is ready to be merged. If anyone could have a look, I'd be grateful!

@ssordopalacios
Copy link
Contributor

It looks like @bertramr's fix works well up until 2019a. I am getting an error with the str2double() function in this latest release of MATLAB, but I'll open a different issue and document it.

@ssordopalacios
Copy link
Contributor

My apologies - for clarification, the str2double bug was not introduced by the indentation fix - I just became aware of it when I checked out the fix and ran it.

@bastibe bastibe merged commit 24ff197 into bastibe:master Sep 6, 2019
@bastibe
Copy link
Owner

bastibe commented Sep 6, 2019

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants